// ==++==
// 
//   Copyright (c) Microsoft Corporation.  All rights reserved.
// 
// ==--==

// Turns on packing of structures to align structures with 4 bytes, which 
// disables the automatic 8-byte alignment on 64-bit platforms.
#include <pshpack4.h>

const unsigned int RIL_PBINDEX_FIRSTAVAILABLE = 0xffffffff;
const unsigned int NOTIFICATION_CLASS_MASK = 0xFFFF0000;
typedef wchar_t WCHAR;
typedef long HRESULT;
typedef unsigned long DWORD;

typedef unsigned short WORD;
typedef DWORD HUICCAPP;
typedef struct RILRANGE {
    DWORD dwMinValue;
    DWORD dwMaxValue;
} RILRANGE, *LPRILRANGE;

typedef enum RILADDRESSPARAMMASK {
    RIL_PARAM_A_NONE = 0x00000000,
    RIL_PARAM_A_TYPE = 0x00000001,
    RIL_PARAM_A_NUMPLAN = 0x00000002,
    RIL_PARAM_A_ADDRESS = 0x00000004,
    RIL_PARAM_A_ALL = 0x00000007
} RILADDRESSPARAMMASK;

typedef enum RILADDRESSTYPE {
    RIL_ADDRTYPE_UNKNOWN = 0x00000000,
    RIL_ADDRTYPE_INTERNATIONAL = 0x00000001,
    RIL_ADDRTYPE_NATIONAL = 0x00000002,
    RIL_ADDRTYPE_NETWKSPECIFIC = 0x00000003,
    RIL_ADDRTYPE_SUBSCRIBER = 0x00000004,
    RIL_ADDRTYPE_ALPHANUM = 0x00000005,
    RIL_ADDRTYPE_ABBREV = 0x00000006,
    RIL_ADDRTYPE_IP = 0x00000007,
    RIL_ADDRTYPE_EMAIL = 0x00000008,
    RIL_ADDRTYPE_URI = 0x00000009,
    RIL_ADDRTYPE_MAX = RIL_ADDRTYPE_URI
} RILADDRESSTYPE;

typedef enum RILADDRESSNUMPLAN {
    RIL_NUMPLAN_UNKNOWN = 0x00000000,
    RIL_NUMPLAN_TELEPHONE = 0x00000001,
    RIL_NUMPLAN_DATA = 0x00000002,
    RIL_NUMPLAN_TELEX = 0x00000003,
    RIL_NUMPLAN_NATIONAL = 0x00000004,
    RIL_NUMPLAN_PRIVATE = 0x00000005,
    RIL_NUMPLAN_ERMES = 0x00000006,
    RIL_NUMPLAN_MAX = RIL_NUMPLAN_ERMES
} RILADDRESSNUMPLAN;

typedef struct RILADDRESS {
    DWORD cbSize;
    DWORD dwParams;
    RILADDRESSTYPE dwType;
    RILADDRESSNUMPLAN dwNumPlan;
    WCHAR wszAddress[256];
} RILADDRESS, *LPRILADDRESS;

typedef enum RILSUBADDRESSPARAMMASK {
    RIL_PARAM_SA_TYPE = 0x00000001,
    RIL_PARAM_SA_SUBADDRESS = 0x00000002,
    RIL_PARAM_SA_ALL = 0x00000003
} RILSUBADDRESSPARAMMASK;

typedef enum RILSUBADDRESSTYPE {
    RIL_SUBADDRTYPE_NSAP = 0x00000001,
    RIL_SUBADDRTYPE_USER = 0x00000002,
    RIL_SUBADDRTYPE_MAX = RIL_SUBADDRTYPE_USER
} RILSUBADDRESSTYPE;

typedef struct RILSUBADDRESS {
    DWORD cbSize;
    DWORD dwParams;
    RILSUBADDRESSTYPE dwType;
    WCHAR wszSubAddress[256];
} RILSUBADDRESS, *LPRILSUBADDRESS;

typedef enum RILOPERATORNAMESPARAMMASK {
    RIL_PARAM_ON_LONGNAME = 0x00000001,
    RIL_PARAM_ON_SHORTNAME = 0x00000002,
    RIL_PARAM_ON_NUMNAME = 0x00000004,
    RIL_PARAM_ON_COUNTRY_CODE = 0x00000008,
    RIL_PARAM_ON_SYSTEMTYPE = 0x00000010,
    RIL_PARAM_ON_ALL = 0x0000001F
} RILOPERATORNAMESPARAMMASK;

typedef enum RILSYSTEMTYPE {
    RIL_SYSTEMTYPE_NONE = 0x00000000,
    RIL_SYSTEMTYPE_1XRTT = 0x00000001,
    RIL_SYSTEMTYPE_EVDO = 0x00000002,
    RIL_SYSTEMTYPE_GSM = 0x00000004,
    RIL_SYSTEMTYPE_UMTS = 0x00000008,
    RIL_SYSTEMTYPE_LTE = 0x00000010,
    RIL_SYSTEMTYPE_TDSCDMA = 0x00000020,
    RIL_SYSTEMTYPE_CDMA = RIL_SYSTEMTYPE_1XRTT | RIL_SYSTEMTYPE_EVDO,
    RIL_SYSTEMTYPE_GSMUMTS = RIL_SYSTEMTYPE_GSM | RIL_SYSTEMTYPE_UMTS,
    RIL_SYSTEMTYPE_GSMTDS = RIL_SYSTEMTYPE_GSM | RIL_SYSTEMTYPE_TDSCDMA,
    RIL_SYSTEMTYPE_GSMUMTSTDS = RIL_SYSTEMTYPE_GSMUMTS | RIL_SYSTEMTYPE_TDSCDMA,
    RIL_SYSTEMTYPE_3GPP = RIL_SYSTEMTYPE_GSMUMTSTDS | RIL_SYSTEMTYPE_LTE,
    RIL_SYSTEMTYPE_ALL = 0x0000003F
} RILSYSTEMTYPE;

typedef struct RILOPERATORNAMES {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwSystemType;
    WCHAR wszLongName[32];
    WCHAR wszShortName[16];
    WCHAR wszNumName[16];
    WCHAR wszCountryCode[8];
} RILOPERATORNAMES, *LPRILOPERATORNAMES;

typedef enum RILMSGDCSPARAMMASK {
    RIL_PARAM_MDCS_TYPE = 0x00000001,
    RIL_PARAM_MDCS_FLAGS = 0x00000002,
    RIL_PARAM_MDCS_MSGCLASS = 0x00000004,
    RIL_PARAM_MDCS_ALPHABET = 0x00000008,
    RIL_PARAM_MDCS_INDICATION = 0x00000010,
    RIL_PARAM_MDCS_LANGUAGE = 0x00000020,
    RIL_PARAM_MDCS_ALL = 0x0000003F
} RILMSGDCSPARAMMASK;

typedef enum RILMSGDCSTYPE {
    RIL_DCSTYPE_GENERAL = 0x00000001,
    RIL_DCSTYPE_MSGWAIT = 0x00000002,
    RIL_DCSTYPE_MSGCLASS = 0x00000003,
    RIL_DCSTYPE_LANGUAGE = 0x00000004,
    RIL_DCSTYPE_MAX = RIL_DCSTYPE_LANGUAGE
} RILMSGDCSTYPE;

typedef enum RILMSGDCSFLAGS {
    RIL_DCSFLAG_NONE = 0x00000000,
    RIL_DCSFLAG_COMPRESSED = 0x00000001,
    RIL_DCSFLAG_INDICATIONACTIVE = 0x00000002,
    RIL_DCSFLAG_DISCARD = 0x00000004,
    RIL_DCSFLAG_ALL = 0x00000007
} RILMSGDCSFLAGS;

typedef enum RILMSGDCSMSGCLASS {
    RIL_DCSMSGCLASS_0 = 0x00000001,
    RIL_DCSMSGCLASS_1 = 0x00000002,
    RIL_DCSMSGCLASS_2 = 0x00000003,
    RIL_DCSMSGCLASS_3 = 0x00000004,
    RIL_DCSMSGCLASS_MAX = RIL_DCSMSGCLASS_3
} RILMSGDCSMSGCLASS;

typedef enum RILMSGDCSALPHABET {
    RIL_DCSALPHABET_DEFAULT = 0x00000001,
    RIL_DCSALPHABET_8BIT = 0x00000002,
    RIL_DCSALPHABET_UCS2 = 0x00000003,
    RIL_DCSALPHABET_MAX = RIL_DCSALPHABET_UCS2
} RILMSGDCSALPHABET;

typedef enum RILMSGDCSINDICATION {
    RIL_DCSINDICATION_VOICEMAIL = 0x00000001,
    RIL_DCSINDICATION_FAX = 0x00000002,
    RIL_DCSINDICATION_EMAIL = 0x00000003,
    RIL_DCSINDICATION_OTHER = 0x00000004,
    RIL_DCSINDICATION_MAX = RIL_DCSINDICATION_OTHER
} RILMSGDCSINDICATION;

typedef enum RILDCSLANG {
    RIL_DCSLANG_None = 0x00000000,
    RIL_DCSLANG_UNKNOWN = 0x00000001,
    RIL_DCSLANG_GERMAN = 0x00000002,
    RIL_DCSLANG_ENGLISH = 0x00000004,
    RIL_DCSLANG_ITALIAN = 0x00000008,
    RIL_DCSLANG_FRENCH = 0x00000010,
    RIL_DCSLANG_SPANISH = 0x00000020,
    RIL_DCSLANG_DUTCH = 0x00000040,
    RIL_DCSLANG_SWEDISH = 0x00000080,
    RIL_DCSLANG_DANISH = 0x00000100,
    RIL_DCSLANG_PORTUGUESE = 0x00000200,
    RIL_DCSLANG_FINNISH = 0x00000400,
    RIL_DCSLANG_NORWEGIAN = 0x00000800,
    RIL_DCSLANG_GREEK = 0x00001000,
    RIL_DCSLANG_TURKISH = 0x00002000,
    RIL_DCSLANG_HUNGARIAN = 0x00004000,
    RIL_DCSLANG_POLISH = 0x00008000,
    RIL_DCSLANG_CZECH = 0x00010000,
    RIL_DCSLANG_HEBREW = 0x00020000,
    RIL_DCSLANG_ARABIC = 0x00040000,
    RIL_DCSLANG_RUSSIAN = 0x00080000,
    RIL_DCSLANG_ICELANDIC = 0x00100000,
    RIL_DCSLANG_ALL = 0x001FFFFF
} RILDCSLANG;

typedef struct RILMSGDCS {
    DWORD cbSize;
    DWORD dwParams;
    RILMSGDCSTYPE dwType;
    DWORD dwFlags;
    RILMSGDCSMSGCLASS dwMsgClass;
    RILMSGDCSALPHABET dwAlphabet;
    RILMSGDCSINDICATION dwIndication;
    DWORD dwLanguage;
} RILMSGDCS, *LPRILMSGDCS;

typedef struct RILSYSTEMTIME {
    WORD wYear;
    WORD wMonth;
    WORD wDayOfWeek;
    WORD wDay;
    WORD wHour;
    WORD wMinute;
    WORD wSecond;
    WORD wMilliseconds;
} RILSYSTEMTIME, *LPRILSYSTEMTIME;

typedef enum RILMESSAGEPARAMMASK {
    RIL_PARAM_M_SVCCTRADDRESS = 0x00000001,
    RIL_PARAM_M_TYPE = 0x00000002,
    RIL_PARAM_M_FLAGS = 0x00000004,
    RIL_PARAM_M_ORIGADDRESS = 0x00000008,
    RIL_PARAM_M_TGTRECIPADDRESS = 0x00000010,
    RIL_PARAM_M_DESTADDRESS = 0x00000020,
    RIL_PARAM_M_SCRECEIVETIME = 0x00000040,
    RIL_PARAM_M_TGTSCRECEIVETIME = 0x00000080,
    RIL_PARAM_M_TGTDISCHARGETIME = 0x00000100,
    RIL_PARAM_M_PROTOCOLID = 0x00000200,
    RIL_PARAM_M_DATACODING = 0x00000800,
    RIL_PARAM_M_TGTDLVSTATUS = 0x00001000,
    RIL_PARAM_M_VPFORMAT = 0x00004000,
    RIL_PARAM_M_VP = 0x00008000,
    RIL_PARAM_M_GEOSCOPE = 0x00020000,
    RIL_PARAM_M_MSGCODE = 0x00040000,
    RIL_PARAM_M_UPDATENUMBER = 0x00080000,
    RIL_PARAM_M_ID = 0x00100000,
    RIL_PARAM_M_TOTALPAGES = 0x00200000,
    RIL_PARAM_M_PAGENUMBER = 0x00400000,
    RIL_PARAM_M_HDRLENGTH = 0x00800000,
    RIL_PARAM_M_SERIALNUMBER = 0x00800000,
    RIL_PARAM_M_MSGLENGTH = 0x01000000,
    RIL_PARAM_M_HDR = 0x04000000,
    RIL_PARAM_M_MSG = 0x08000000,
    RIL_PARAM_M_WARNINGTYPE = 0x20000000,
    RIL_PARAM_M_EUSERALERT = 0x40000000,
    RIL_PARAM_M_POPUP = 0x80000000,
    RIL_PARAM_M_MSGID = 0x20000000,
    RIL_PARAM_M_ORIGSUBADDRESS = 0x40000000,
    RIL_PARAM_M_DESTSUBADDRESS = 0x80000000,
    RIL_PARAM_M_DIGIT = 0x00010000,
    RIL_PARAM_M_PRIVACY = 0x00000100,
    RIL_PARAM_M_PRIORITY = 0x00000200,
    RIL_PARAM_M_TELESERVICE = 0x00000400,
    RIL_PARAM_M_LANG = 0x00000800,
    RIL_PARAM_M_VALIDITYPERIODABS = 0x00001000,
    RIL_PARAM_M_VALIDITYPERIODREL = 0x00002000,
    RIL_PARAM_M_DEFERREDDELTIMEABS = 0x00004000,
    RIL_PARAM_M_DEFERREDDELTIMEREL = 0x00008000,
    RIL_PARAM_M_ENCODING = 0x00020000,
    RIL_PARAM_M_USERRESPONSECODE = 0x00040000,
    RIL_PARAM_M_DISPLAYMODE = 0x00080000,
    RIL_PARAM_M_CALLBACKNUM = 0x00000010,
    RIL_PARAM_M_NUMMSGS = 0x00000080,
    RIL_PARAM_M_CAUSECODE = 0x00100000,
    RIL_PARAM_M_REPLYSEQNUMBER = 0x00200000,
    RIL_PARAM_M_SERVICEID = 0x00200000,
    RIL_PARAM_M_USERACK = 0x00400000,
    RIL_PARAM_M_DELIVERYACK = 0x00800000,
    RIL_PARAM_M_ALERTONMSGDELIVERY = 0x00800000,
    RIL_PARAM_M_HDRLENGTHCDMA = 0x02000000,
    RIL_PARAM_M_MSGSTATUSTYPE = 0x10000000,
    RIL_PARAM_M_BEARERREPLYACK = 0x10000000,
    RIL_PARAM_M_ALL_IN_DELIVER = RIL_PARAM_M_TYPE | RIL_PARAM_M_FLAGS | RIL_PARAM_M_ORIGADDRESS | RIL_PARAM_M_PROTOCOLID | RIL_PARAM_M_DATACODING | RIL_PARAM_M_SCRECEIVETIME | RIL_PARAM_M_HDRLENGTH | RIL_PARAM_M_MSGLENGTH | RIL_PARAM_M_HDR | RIL_PARAM_M_MSG,
    RIL_PARAM_M_ALL_IN_STATUS = RIL_PARAM_M_TYPE | RIL_PARAM_M_FLAGS | RIL_PARAM_M_MSGID | RIL_PARAM_M_TGTRECIPADDRESS | RIL_PARAM_M_TGTSCRECEIVETIME | RIL_PARAM_M_TGTDISCHARGETIME | RIL_PARAM_M_TGTDLVSTATUS | RIL_PARAM_M_PROTOCOLID | RIL_PARAM_M_DATACODING | RIL_PARAM_M_HDRLENGTH | RIL_PARAM_M_MSGLENGTH | RIL_PARAM_M_HDR | RIL_PARAM_M_MSG,
    RIL_PARAM_M_ALL_OUT_SUBMIT = RIL_PARAM_M_TYPE | RIL_PARAM_M_FLAGS | RIL_PARAM_M_DESTADDRESS | RIL_PARAM_M_PROTOCOLID | RIL_PARAM_M_DATACODING | RIL_PARAM_M_VPFORMAT | RIL_PARAM_M_VP | RIL_PARAM_M_HDRLENGTH | RIL_PARAM_M_MSGLENGTH | RIL_PARAM_M_HDR | RIL_PARAM_M_MSG,
    RIL_PARAM_M_ALL_BC_GENERAL = RIL_PARAM_M_TYPE | RIL_PARAM_M_GEOSCOPE | RIL_PARAM_M_MSGCODE | RIL_PARAM_M_UPDATENUMBER | RIL_PARAM_M_ID | RIL_PARAM_M_DATACODING | RIL_PARAM_M_TOTALPAGES | RIL_PARAM_M_PAGENUMBER | RIL_PARAM_M_MSGLENGTH | RIL_PARAM_M_MSG,
    RIL_PARAM_M_ALL_IN_IS637DELIVER = RIL_PARAM_M_TYPE | RIL_PARAM_M_MSGID | RIL_PARAM_M_TELESERVICE | RIL_PARAM_M_DISPLAYMODE | RIL_PARAM_M_USERACK | RIL_PARAM_M_ORIGADDRESS | RIL_PARAM_M_ORIGSUBADDRESS | RIL_PARAM_M_SCRECEIVETIME | RIL_PARAM_M_PRIORITY | RIL_PARAM_M_PRIVACY | RIL_PARAM_M_CALLBACKNUM | RIL_PARAM_M_NUMMSGS | RIL_PARAM_M_VALIDITYPERIODABS | RIL_PARAM_M_LANG | RIL_PARAM_M_ENCODING | RIL_PARAM_M_MSGLENGTH | RIL_PARAM_M_MSG,
    RIL_PARAM_M_ALL_OUT_IS637SUBMIT = RIL_PARAM_M_TYPE | RIL_PARAM_M_MSGID | RIL_PARAM_M_TELESERVICE | RIL_PARAM_M_DISPLAYMODE | RIL_PARAM_M_DESTADDRESS | RIL_PARAM_M_DESTSUBADDRESS | RIL_PARAM_M_DIGIT | RIL_PARAM_M_BEARERREPLYACK | RIL_PARAM_M_PRIORITY | RIL_PARAM_M_PRIVACY | RIL_PARAM_M_CALLBACKNUM | RIL_PARAM_M_USERACK | RIL_PARAM_M_DELIVERYACK | RIL_PARAM_M_VALIDITYPERIODABS | RIL_PARAM_M_VALIDITYPERIODREL | RIL_PARAM_M_DEFERREDDELTIMEABS | RIL_PARAM_M_DEFERREDDELTIMEREL | RIL_PARAM_M_LANG | RIL_PARAM_M_ENCODING | RIL_PARAM_M_MSGLENGTH | RIL_PARAM_M_MSG,
    RIL_PARAM_M_ALL_IN_IS637STATUS = RIL_PARAM_M_TYPE | RIL_PARAM_M_MSGID | RIL_PARAM_M_ORIGADDRESS | RIL_PARAM_M_ORIGSUBADDRESS | RIL_PARAM_M_SCRECEIVETIME | RIL_PARAM_M_CAUSECODE | RIL_PARAM_M_REPLYSEQNUMBER | RIL_PARAM_M_LANG | RIL_PARAM_M_ENCODING | RIL_PARAM_M_MSGLENGTH | RIL_PARAM_M_MSG | RIL_PARAM_M_USERRESPONSECODE | RIL_PARAM_M_MSGSTATUSTYPE,
    RIL_PARAM_M_ALL_OUT_IS637STATUS = RIL_PARAM_M_TYPE | RIL_PARAM_M_MSGID | RIL_PARAM_M_DESTADDRESS | RIL_PARAM_M_DESTSUBADDRESS | RIL_PARAM_M_REPLYSEQNUMBER | RIL_PARAM_M_LANG | RIL_PARAM_M_ENCODING | RIL_PARAM_M_MSGLENGTH | RIL_PARAM_M_MSG | RIL_PARAM_M_USERRESPONSECODE | RIL_PARAM_M_DIGIT
} RILMESSAGEPARAMMASK;

typedef enum RILMSGPROTOCOLID {
    RIL_MSGPROTOCOL_UNKNOWN = 0x00000001,
    RIL_MSGPROTOCOL_SMETOSME = 0x00000002,
    RIL_MSGPROTOCOL_IMPLICIT = 0x00000003,
    RIL_MSGPROTOCOL_TELEX = 0x00000004,
    RIL_MSGPROTOCOL_TELEFAX_GROUP3 = 0x00000005,
    RIL_MSGPROTOCOL_TELEFAX_GROUP4 = 0x00000006,
    RIL_MSGPROTOCOL_VOICEPHONE = 0x00000007,
    RIL_MSGPROTOCOL_ERMES = 0x00000008,
    RIL_MSGPROTOCOL_PAGING = 0x00000009,
    RIL_MSGPROTOCOL_VIDEOTEX = 0x0000000a,
    RIL_MSGPROTOCOL_TELETEX = 0x0000000b,
    RIL_MSGPROTOCOL_TELETEX_PSPDN = 0x0000000c,
    RIL_MSGPROTOCOL_TELETEX_CSPDN = 0x0000000d,
    RIL_MSGPROTOCOL_TELETEX_PSTN = 0x0000000e,
    RIL_MSGPROTOCOL_TELETEX_ISDN = 0x0000000f,
    RIL_MSGPROTOCOL_UCI = 0x00000010,
    RIL_MSGPROTOCOL_MSGHANDLING = 0x00000011,
    RIL_MSGPROTOCOL_X400 = 0x00000012,
    RIL_MSGPROTOCOL_EMAIL = 0x00000013,
    RIL_MSGPROTOCOL_SCSPECIFIC1 = 0x00000014,
    RIL_MSGPROTOCOL_SCSPECIFIC2 = 0x00000015,
    RIL_MSGPROTOCOL_SCSPECIFIC3 = 0x00000016,
    RIL_MSGPROTOCOL_SCSPECIFIC4 = 0x00000017,
    RIL_MSGPROTOCOL_SCSPECIFIC5 = 0x00000018,
    RIL_MSGPROTOCOL_SCSPECIFIC6 = 0x00000019,
    RIL_MSGPROTOCOL_SCSPECIFIC7 = 0x0000001a,
    RIL_MSGPROTOCOL_GSMSTATION = 0x0000001b,
    RIL_MSGPROTOCOL_SM_TYPE0 = 0x0000001c,
    RIL_MSGPROTOCOL_RSM_TYPE1 = 0x0000001d,
    RIL_MSGPROTOCOL_RSM_TYPE2 = 0x0000001e,
    RIL_MSGPROTOCOL_RSM_TYPE3 = 0x0000001f,
    RIL_MSGPROTOCOL_RSM_TYPE4 = 0x00000020,
    RIL_MSGPROTOCOL_RSM_TYPE5 = 0x00000021,
    RIL_MSGPROTOCOL_RSM_TYPE6 = 0x00000022,
    RIL_MSGPROTOCOL_RSM_TYPE7 = 0x00000023,
    RIL_MSGPROTOCOL_RETURNCALL = 0x00000024,
    RIL_MSGPROTOCOL_ME_DOWNLOAD = 0x00000025,
    RIL_MSGPROTOCOL_DEPERSONALIZATION = 0x00000026,
    RIL_MSGPROTOCOL_UICC_DOWNLOAD = 0x00000027,
    RIL_MSGPROTOCOL_MAX = RIL_MSGPROTOCOL_UICC_DOWNLOAD
} RILMSGPROTOCOLID;

typedef struct RILMSGINDELIVER {
    RILADDRESS raOrigAddress;
    RILMSGPROTOCOLID dwProtocolID;
    RILMSGDCS rmdDataCoding;
    RILSYSTEMTIME stSCReceiveTime;
    DWORD dwMsgID;
    DWORD cbHdrLength;
    DWORD cchMsgLength;
    BYTE rgbHdr[256];
    BYTE rgbMsg[512];
} RILMSGINDELIVER, *LPRILMSGINDELIVER;

typedef enum RILMSGINSTATUSTGTDLVSTATUS {
    RIL_MSGDLVSTATUS_RECEIVEDBYSME = 0x00000001,
    RIL_MSGDLVSTATUS_FORWARDEDTOSME = 0x00000002,
    RIL_MSGDLVSTATUS_REPLACEDBYSC = 0x00000003,
    RIL_MSGDLVSTATUS_CONGESTION_TRYING = 0x00000004,
    RIL_MSGDLVSTATUS_SMEBUSY_TRYING = 0x00000005,
    RIL_MSGDLVSTATUS_SMENOTRESPONDING_TRYING = 0x00000006,
    RIL_MSGDLVSTATUS_SVCREJECTED_TRYING = 0x00000007,
    RIL_MSGDLVSTATUS_QUALITYUNAVAIL_TRYING = 0x00000008,
    RIL_MSGDLVSTATUS_SMEERROR_TRYING = 0x00000009,
    RIL_MSGDLVSTATUS_CONGESTION = 0x0000000a,
    RIL_MSGDLVSTATUS_SMEBUSY = 0x0000000b,
    RIL_MSGDLVSTATUS_SMENOTRESPONDING = 0x0000000c,
    RIL_MSGDLVSTATUS_SVCREJECTED = 0x0000000d,
    RIL_MSGDLVSTATUS_QUALITYUNAVAIL_TEMP = 0x0000000e,
    RIL_MSGDLVSTATUS_SMEERROR = 0x0000000f,
    RIL_MSGDLVSTATUS_REMOTEPROCERROR = 0x00000010,
    RIL_MSGDLVSTATUS_INCOMPATIBLEDEST = 0x00000011,
    RIL_MSGDLVSTATUS_CONNECTIONREJECTED = 0x00000012,
    RIL_MSGDLVSTATUS_NOTOBTAINABLE = 0x00000013,
    RIL_MSGDLVSTATUS_NOINTERNETWORKING = 0x00000014,
    RIL_MSGDLVSTATUS_VPEXPIRED = 0x00000015,
    RIL_MSGDLVSTATUS_DELETEDBYORIGSME = 0x00000016,
    RIL_MSGDLVSTATUS_DELETEDBYSC = 0x00000017,
    RIL_MSGDLVSTATUS_NOLONGEREXISTS = 0x00000018,
    RIL_MSGDLVSTATUS_QUALITYUNAVAIL = 0x00000019,
    RIL_MSGDLVSTATUS_RESERVED_COMPLETED = 0x0000001a,
    RIL_MSGDLVSTATUS_RESERVED_TRYING = 0x0000001b,
    RIL_MSGDLVSTATUS_RESERVED_ERROR = 0x0000001c,
    RIL_MSGDLVSTATUS_RESERVED_TMPERROR = 0x0000001d,
    RIL_MSGDLVSTATUS_SCSPECIFIC_COMPLETED = 0x0000001e,
    RIL_MSGDLVSTATUS_SCSPECIFIC_TRYING = 0x0000001f,
    RIL_MSGDLVSTATUS_SCSPECIFIC_ERROR = 0x00000020,
    RIL_MSGDLVSTATUS_SCSPECIFIC_TMPERROR = 0x00000021,
    RIL_MSGDLVSTATUS_MAX = RIL_MSGDLVSTATUS_SCSPECIFIC_TMPERROR
} RILMSGINSTATUSTGTDLVSTATUS;

typedef struct RILMSGINSTATUS {
    DWORD dwMsgID;
    RILADDRESS raTgtRecipAddress;
    RILSYSTEMTIME stTgtSCReceiveTime;
    RILSYSTEMTIME stTgtDischargeTime;
    DWORD dwReserved;
    RILMSGINSTATUSTGTDLVSTATUS dwTgtDlvStatus;
    RILMSGPROTOCOLID dwProtocolID;
    RILMSGDCS rmdDataCoding;
    DWORD cbHdrLength;
    DWORD cchMsgLength;
    BYTE rgbHdr[256];
    BYTE rgbMsg[512];
} RILMSGINSTATUS, *LPRILMSGINSTATUS;

typedef enum RILMSGOUTSUBMITVPFORMAT {
    RIL_MSGVP_NONE = 0x00000000,
    RIL_MSGVP_RELATIVE = 0x00000001,
    RIL_MSGVP_ENHANCED = 0x00000002,
    RIL_MSGVP_ABSOLUTE = 0x00000003,
    RIL_MSGVP_MAX = RIL_MSGVP_ABSOLUTE
} RILMSGOUTSUBMITVPFORMAT;

typedef struct RILMSGOUTSUBMIT {
    RILADDRESS raDestAddress;
    RILMSGPROTOCOLID dwProtocolID;
    RILMSGDCS rmdDataCoding;
    RILMSGOUTSUBMITVPFORMAT dwVPFormat;
    RILSYSTEMTIME stVP;
    DWORD dwMsgID;
    DWORD cbHdrLength;
    DWORD cchMsgLength;
    BYTE rgbHdr[256];
    BYTE rgbMsg[512];
} RILMSGOUTSUBMIT, *LPRILMSGOUTSUBMIT;

typedef enum RILMSGBCGENERALWARNINGTYPE {
    RIL_WARNINGTYPE_EARTHQUAKE = 0x00000000,
    RIL_WARNINGTYPE_TSUNAMI = 0x00000001,
    RIL_WARNINGTYPE_EARTHQUAKETSUNAMI = 0x00000002,
    RIL_WARNINGTYPE_TEST = 0x00000003,
    RIL_WARNINGTYPE_OTHER = 0x00000004,
    RIL_WARNINGTYPE_RESERVED = 0x00000005,
    RIL_WARNINGTYPE_MAX = RIL_WARNINGTYPE_RESERVED
} RILMSGBCGENERALWARNINGTYPE;

typedef enum RILGEOSCOPE {
    RIL_GEOSCOPE_NONE = 0x00,
    RIL_GEOSCOPE_CELL_IMMEDIATE = 0x01,
    RIL_GEOSCOPE_LOCATIONAREA = 0x02,
    RIL_GEOSCOPE_PLMN = 0x03,
    RIL_GEOSCOPE_CELL = 0x04,
    RIL_GEOSCOPE_MAX = RIL_GEOSCOPE_CELL
} RILGEOSCOPE;

typedef struct RILMSGBCGENERAL {
    RILGEOSCOPE dwGeoScope;
    DWORD dwMsgCode;
    DWORD dwUpdateNumber;
    DWORD dwID;
    DWORD dwSerialNumber;
    RILMSGDCS rmdDataCoding;
    DWORD dwTotalPages;
    DWORD dwPageNumber;
    RILMSGBCGENERALWARNINGTYPE dwWarningType;
    BOOL bEmergencyUserAlert;
    BOOL bMessagePopup;
    RILSYSTEMTIME stSCReceiveTime;
    BYTE digSig[43];
    DWORD cchMsgLength;
    BYTE rgbMsg[512];
} RILMSGBCGENERAL, *LPRILMSGBCGENERAL;

typedef enum RILMSGCDMAMSGENCODING {
    RIL_MSGCODING_UNKNOWN = 0x00000000,
    RIL_MSGCODING_7BITASCII = 0x00000002,
    RIL_MSGCODING_UNICODE = 0x00000003,
    RIL_MSGCODING_7BITGSM = 0x00000004,
    RIL_MSGCODING_8BITGSM = 0x00000005,
    RIL_MSGCODING_OCTET = 0x00000006,
    RIL_MSGCODING_IA5 = 0x00000007,
    RIL_MSGCODING_JIS = 0x00000008,
    RIL_MSGCODING_KOREAN = 0x00000009,
    RIL_MSGCODING_LATIN_HEBREW = 0x0000000A,
    RIL_MSGCODING_LATIN = 0x0000000B,
    RIL_MSGCODING_MAX = RIL_MSGCODING_LATIN
} RILMSGCDMAMSGENCODING;

typedef enum RILMSGCDMAMSGSTATUSTYPE {
    RIL_MSGSTATUSTYPE_BEARERACK = 0x00000001,
    RIL_MSGSTATUSTYPE_DELIVERYACK = 0x00000002,
    RIL_MSGSTATUSTYPE_USERACK = 0x00000003,
    RIL_MSGSTATUSTYPE_READACK = 0x00000004,
    RIL_MSGSTATUSTYPE_MAX = RIL_MSGSTATUSTYPE_READACK
} RILMSGCDMAMSGSTATUSTYPE;

typedef enum RILMSGCDMALANGUAGE {
    RIL_MSGCDMALANG_UNKNOWN = 0x00,
    RIL_MSGCDMALANG_ENGLISH = 0x01,
    RIL_MSGCDMALANG_FRENCH = 0x02,
    RIL_MSGCDMALANG_SPANISH = 0x03,
    RIL_MSGCDMALANG_JAPANESE = 0x04,
    RIL_MSGCDMALANG_KOREAN = 0x05,
    RIL_MSGCDMALANG_CHINESE = 0x06,
    RIL_MSGCDMALANG_HEBREW = 0x07,
    RIL_MSGCDMALANG_MAX = RIL_MSGCDMALANG_HEBREW
} RILMSGCDMALANGUAGE;

typedef struct RILMSGIS637INSTATUS {
    RILADDRESS raOrigAddress;
    RILSUBADDRESS rsaOrigSubaddr;
    RILSYSTEMTIME stSCReceiveTime;
    DWORD dwCauseCode;
    DWORD dwReplySeqNumber;
    DWORD dwUserResponseCode;
    RILMSGCDMAMSGSTATUSTYPE dwMsgStatusType;
    DWORD dwMsgID;
    RILMSGCDMALANGUAGE dwMsgLang;
    RILMSGCDMAMSGENCODING dwMsgEncoding;
    DWORD cchMsgLength;
    BYTE rgbMsg[512];
} RILMSGIS637INSTATUS, *LPRILMSGIS637INSTATUS;

typedef enum RILMSGCDMAMSGPRIORITY {
    RIL_MSGPRIORITY_NORMAL = 0x00000001,
    RIL_MSGPRIORITY_HIGH = 0x00000002,
    RIL_MSGPRIORITY_URGENT = 0x00000003,
    RIL_MSGPRIORITY_EMERGENCY = 0x00000004,
    RIL_MSGPRIORITY_MAX = RIL_MSGPRIORITY_EMERGENCY
} RILMSGCDMAMSGPRIORITY;

typedef enum RILMSGCDMAMSGPRIVACY {
    RIL_MSGPRIVACYCLASS_NOTRESTRICTED = 0x00000001,
    RIL_MSGPRIVACYCLASS_RESTRICTED = 0x00000002,
    RIL_MSGPRIVACYCLASS_CONFIDENTIAL = 0x00000003,
    RIL_MSGPRIVACYCLASS_SECRET = 0x00000004,
    RIL_MSGPRIVACYCLASS_MAX = RIL_MSGPRIVACYCLASS_SECRET
} RILMSGCDMAMSGPRIVACY;

typedef enum RILMSGCDMAMSGDISPLAYMODE {
    RIL_MSGDISPLAYMODE_IMMEDIATE = 0x00000001,
    RIL_MSGDISPLAYMODE_MOBILEDEFAULT = 0x00000002,
    RIL_MSGDISPLAYMODE_USERDEFAULT = 0x00000003,
    RIL_MSGDISPLAYMODE_MAX = RIL_MSGDISPLAYMODE_USERDEFAULT
} RILMSGCDMAMSGDISPLAYMODE;

typedef enum RILMSGCDMATELESERVICE {
    RIL_MSGTELESERVICE_PAGING_OLD = 0x00000001,
    RIL_MSGTELESERVICE_MESSAGING_OLD = 0x00000002,
    RIL_MSGTELESERVICE_VOICEMAIL_OLD = 0x00000003,
    RIL_MSGTELESERVICE_WAP_OLD = 0x00000004,
    RIL_MSGTELESERVICE_BROADCAST_OLD = 0x00000005,
    RIL_MSGTELESERVICE_SELFREG_OLD = 0x00000006,
    RIL_MSGTELESERVICE_PAGING = 4097,
    RIL_MSGTELESERVICE_MESSAGING = 4098,
    RIL_MSGTELESERVICE_WEMT = 4101,
    RIL_MSGTELESERVICE_VOICEMAIL_VMN_95 = 4099,
    RIL_MSGTELESERVICE_VOICEMAIL_MWI = 0x00040000,
    RIL_MSGTELESERVICE_WAP = 4100,
    RIL_MSGTELESERVICE_WAP_CT_MMS = 65002,
    RIL_MSGTELESERVICE_WAP_CT_OMA = 65009,
    RIL_MSGTELESERVICE_BROADCAST = 0x00050000,
    RIL_MSGTELESERVICE_SELFREG = 0x00040000
} RILMSGCDMATELESERVICE;

typedef enum RILMSGCDMABROADCASTSERVICEID {
    RIL_1xBROADCAST_CMAS_PRESIDENTIAL = 0x1000,
    RIL_1xBROADCAST_CMAS_EXTREME = 0x1001,
    RIL_1xBROADCAST_CMAS_SEVERE = 0x1002,
    RIL_1xBROADCAST_CMAS_AMBER = 0x1003,
    RIL_1xBROADCAST_CMAS_TEST = 0x1004
} RILMSGCDMABROADCASTSERVICEID;

typedef struct RILMSGCDMAINDELIVER {
    RILADDRESS raOrigAddress;
    RILSUBADDRESS rsaOrigSubaddr;
    RILSYSTEMTIME stSCReceiveTime;
    RILSYSTEMTIME stValidityPeriodAbs;
    RILSYSTEMTIME stValidityPeriodRel;
    RILSYSTEMTIME stDeferredDelTimeAbs;
    RILSYSTEMTIME stDeferredDelTimeRel;
    DWORD dwNumMsgs;
    RILADDRESS raCallBackNumber;
    RILMSGCDMAMSGPRIORITY dwMsgPriority;
    DWORD dwAlertOnMsgDelivery;
    RILMSGCDMAMSGPRIVACY dwMsgPrivacy;
    BOOL bUserAckRequest;
    RILMSGCDMAMSGDISPLAYMODE dwMsgDisplayMode;
    DWORD dwTeleservice;
    DWORD dwServiceID;
    DWORD dwMsgID;
    RILMSGCDMALANGUAGE dwMsgLang;
    RILMSGCDMAMSGENCODING dwMsgEncoding;
    DWORD cbHdrLength;
    DWORD cchMsgLength;
    BYTE rgbHdr[140];
    BYTE rgbMsg[256];
} RILMSGCDMAINDELIVER, *LPRILMSGCDMAINDELIVER;

typedef struct RILMSGCDMAOUTSUBMIT {
    RILADDRESS raDestAddress;
    RILSUBADDRESS rsaDestSubaddr;
    BOOL bDigit;
    RILSYSTEMTIME stValidityPeriodAbs;
    RILSYSTEMTIME stValidityPeriodRel;
    RILSYSTEMTIME stDeferredDelTimeAbs;
    RILSYSTEMTIME stDeferredDelTimeRel;
    BOOL bDeliveryAckRequest;
    BOOL bUserAckRequest;
    BOOL bBearerReplyRequest;
    DWORD dwReplySeqNumber;
    RILMSGCDMAMSGDISPLAYMODE dwMsgDisplayMode;
    RILADDRESS raCallBackNumber;
    RILMSGCDMAMSGPRIORITY dwMsgPriority;
    RILMSGCDMAMSGPRIVACY dwMsgPrivacy;
    DWORD dwTeleservice;
    DWORD dwMsgID;
    RILMSGCDMALANGUAGE dwMsgLang;
    RILMSGCDMAMSGENCODING dwMsgEncoding;
    DWORD cbHdrLength;
    DWORD cchMsgLength;
    BYTE rgbHdr[140];
    BYTE rgbMsg[256];
} RILMSGCDMAOUTSUBMIT, *LPRILMSGCDMAOUTSUBMIT;

typedef enum RILMSGCLASS {
    RIL_MSGCLASS_NONE = 0x00000000,
    RIL_MSGCLASS_INCOMING = 0x00010000,
    RIL_MSGCLASS_OUTGOING = 0x00020000,
    RIL_MSGCLASS_BROADCAST = 0x00040000,
    RIL_MSGCLASS_ALL = 0x00070000
} RILMSGCLASS;

typedef enum RILMESSAGETYPE {
    RIL_MSGTYPE_IN_DELIVER = 0x00000001 | RIL_MSGCLASS_INCOMING,
    RIL_MSGTYPE_IN_STATUS = 0x00000002 | RIL_MSGCLASS_INCOMING,
    RIL_MSGTYPE_IN_IS637STATUS = 0x00000008 | RIL_MSGCLASS_INCOMING,
    RIL_MSGTYPE_IN_CDMADELIVER = 0x00000020 | RIL_MSGCLASS_INCOMING,
    RIL_MSGTYPE_OUT_SUBMIT = 0x00000001 | RIL_MSGCLASS_OUTGOING,
    RIL_MSGTYPE_OUT_CDMASUBMIT = 0x00000020 | RIL_MSGCLASS_OUTGOING,
    RIL_MSGTYPE_BC_GENERAL = 0x00000002 | RIL_MSGCLASS_BROADCAST
} RILMESSAGETYPE;

typedef enum RILMESSAGEFLAGS {
    RIL_MSGFLAG_NONE = 0x00000000,
    RIL_MSGFLAG_MORETOSEND = 0x00000001,
    RIL_MSGFLAG_REPLYPATH = 0x00000002,
    RIL_MSGFLAG_HEADER = 0x00000004,
    RIL_MSGFLAG_REJECTDUPS = 0x00000008,
    RIL_MSGFLAG_STATUSREPORTRETURNED = 0x00000010,
    RIL_MSGFLAG_STATUSREPORTREQUESTED = 0x00000020,
    RIL_MSGFLAG_CAUSEDBYCOMMAND = 0x00000040,
    RIL_MSGFLAG_ALL = 0x0000007f
} RILMESSAGEFLAGS;

typedef struct RILMESSAGE {
    DWORD cbSize;
    DWORD dwParams;
    RILADDRESS raSvcCtrAddress;
    RILMESSAGETYPE dwType;
    DWORD dwFlags;
     union RILMSGUNION {
        
            RILMSGINDELIVER unMsgInDeliver;
        
            RILMSGINSTATUS unMsgInStatus;
        
            RILMSGOUTSUBMIT unMsgOutSubmit;
        
            RILMSGBCGENERAL unMsgBcGeneral;
        
            RILMSGIS637INSTATUS unMsgIS637InStatus;
        
            RILMSGCDMAINDELIVER unMsgCDMAInDeliver;
        
            RILMSGCDMAOUTSUBMIT unMsgCDMAOutSubmit;
    } msgUnion;
} RILMESSAGE, *LPRILMESSAGE;

typedef struct RILUICCFILEPATH {
    HUICCAPP hUiccApp;
    DWORD dwFilePathLen;
    WORD wFilePath[8];
} RILUICCFILEPATH, *LPRILUICCFILEPATH;

typedef enum RILUICCKEYREF {
    RIL_UICCKEYREF_ALW = 0x00,
    RIL_UICCKEYREF_PIN1 = 0x01,
    RIL_UICCKEYREF_UPIN = 0x10,
    RIL_UICCKEYREF_PIN2 = 0x81,
    RIL_UICCKEYREF_NEV = 0xff
} RILUICCKEYREF;

typedef struct RILUICCLOCK {
    HUICCAPP hUiccApp;
    DWORD dwKeyRef;
} RILUICCLOCK, *LPRILUICCLOCK;

typedef struct RILUICCLOCKCREDENTIAL {
    RILUICCLOCK rilUiccLock;
    char szPassword[256];
} RILUICCLOCKCREDENTIAL, *LPRILUICCLOCKCREDENTIAL;

typedef enum RILCALLDISCONNECTDETAILSDISCONNECTGROUP {
    RIL_CD_UNKNOWN_CAUSE = 0x00000000,
    RIL_CD_AS_CAUSE = 0x00000001,
    RIL_CD_3GPP_NETWORK_CAUSE = 0x00000002,
    RIL_CD_3GPP2_VENDOR_CAUSE = 0x00000003,
    RIL_CD_OTHER_CAUSE = 0x00000004,
    RIL_CD_3GPP_REJECT_CAUSE = 0x00000005,
    RIL_CD_IMS_SIP_CAUSE = 0x00000006,
    RIL_CD_CAUSE_MAX = RIL_CD_IMS_SIP_CAUSE
} RILCALLDISCONNECTDETAILSDISCONNECTGROUP;

typedef enum RILCALLDISCONNECTDETAILSASCODE {
    RIL_CD_PHYSICAL_LAYER = 0x00000001,
    RIL_CD_L2 = 0x00000002,
    RIL_CD_L3 = 0x00000003,
    RIL_CD_LAYER_MAX = RIL_CD_L3
} RILCALLDISCONNECTDETAILSASCODE;

typedef enum RIL3GPPCALLCONTROLCAUSECODE {
    RIL_3GPPCCCAUSE_UNASSIGNED_NUMBER = 1,
    RIL_3GPPCCCAUSE_NO_ROUTE_TO_DESTINATION = 3,
    RIL_3GPPCCCAUSE_CHANNEL_UNACCEPTABLE = 6,
    RIL_3GPPCCCAUSE_OPERATOR_DETERMINED_BARRING = 8,
    RIL_3GPPCCCAUSE_NORMAL_CALL_CLEARING = 16,
    RIL_3GPPCCCAUSE_USER_BUSY = 17,
    RIL_3GPPCCCAUSE_NO_USER_RESPONDING = 18,
    RIL_3GPPCCCAUSE_USER_ALERTING_NO_ANSWER = 19,
    RIL_3GPPCCCAUSE_CALL_REJECTED = 21,
    RIL_3GPPCCCAUSE_NUMBER_CHANGED = 22,
    RIL_3GPPCCCAUSE_PREEMPTION = 25,
    RIL_3GPPCCCAUSE_DESTINATION_OUT_OF_ORDER = 27,
    RIL_3GPPCCCAUSE_INVALID_NUMBER_FORMAT = 28,
    RIL_3GPPCCCAUSE_FACILITY_REJECTED = 29,
    RIL_3GPPCCCAUSE_RESPONSE_TO_STATUS_ENQUIRY = 30,
    RIL_3GPPCCCAUSE_NORMAL_UNSPECIFIED = 31,
    RIL_3GPPCCCAUSE_NO_CHANNEL_AVAILABLE = 34,
    RIL_3GPPCCCAUSE_NETWORK_OUT_OF_ORDER = 38,
    RIL_3GPPCCCAUSE_TEMPORARY_FAILURE = 41,
    RIL_3GPPCCCAUSE_CONGESTION = 42,
    RIL_3GPPCCCAUSE_ACCESS_INFORMATION_DISCARDED = 43,
    RIL_3GPPCCCAUSE_REQUESTED_CHANNEL_NOT_AVAILABLE = 44,
    RIL_3GPPCCCAUSE_RESOURCE_UNAVAILABLE_UNSPECIFIED = 47,
    RIL_3GPPCCCAUSE_QOS_UNAVAILABLE = 49,
    RIL_3GPPCCCAUSE_FACILITY_NOT_SUBSCRIBED = 50,
    RIL_3GPPCCCAUSE_INCOMING_CALLS_BARRED_IN_CUG = 55,
    RIL_3GPPCCCAUSE_BEARER_CAPABILITY_NOT_AUTHORIZED = 57,
    RIL_3GPPCCCAUSE_BEARER_CAPABILITY_NOT_AVAILABLE = 58,
    RIL_3GPPCCCAUSE_SVC_NOT_AVAILABLE_UNSPECIFIED = 63,
    RIL_3GPPCCCAUSE_BEARER_SERVICE_NOT_IMPLEMENTED = 65,
    RIL_3GPPCCCAUSE_ACM_NOT_LESS_THAN_ACMMAX = 68,
    RIL_3GPPCCCAUSE_FACILITY_NOT_IMPLEMENTED = 69,
    RIL_3GPPCCCAUSE_ONLY_RESTRICTED_DIGITAL_BEARER = 70,
    RIL_3GPPCCCAUSE_SVC_NOT_IMPLEMENTED_UNSPECIFIED = 79,
    RIL_3GPPCCCAUSE_INVALID_TRANSACTION_ID = 81,
    RIL_3GPPCCCAUSE_USER_NOT_MEMBER_OF_CUG = 87,
    RIL_3GPPCCCAUSE_INCOMPATIBLE_DESTINATION = 88,
    RIL_3GPPCCCAUSE_SEMANTICALLY_INCORRECT_MESSAGE = 95,
    RIL_3GPPCCCAUSE_INVALID_MANDATORY_FUNCTION = 96,
    RIL_3GPPCCCAUSE_MESSAGE_TYPE_NOT_IMPLEMENTED = 97,
    RIL_3GPPCCCAUSE_MESSAGE_TYPE_NOT_COMPATIBLE = 98,
    RIL_3GPPCCCAUSE_IE_NOT_IMPLEMENTED = 99,
    RIL_3GPPCCCAUSE_CONDITIONAL_IE_ERROR = 100,
    RIL_3GPPCCCAUSE_MESSAGE_NOT_COMPATIBLE = 101,
    RIL_3GPPCCCAUSE_RECOVERY_ON_TIMER_EXPIRY = 102,
    RIL_3GPPCCCAUSE_PROTOCOL_ERROR_UNSPECIFIED = 111,
    RIL_3GPPCCCAUSE_INTERWORKING_UNSPECIFIED = 127
} RIL3GPPCALLCONTROLCAUSECODE;

typedef struct RILGPPCAUSE {
    DWORD dwLocation;
    DWORD dwCauseValue;
} RILGPPCAUSE, *LPRILGPPCAUSE;

typedef struct RILGPPREJECTCAUSE {
    DWORD dwCauseValue;
} RILGPPREJECTCAUSE, *LPRILGPPREJECTCAUSE;

typedef struct RILGPP2CAUSE {
    DWORD dwCauseValue;
} RILGPP2CAUSE, *LPRILGPP2CAUSE;

typedef enum RILIMSSIPCAUSECODE {
    RIL_IMSSIPCAUSE_BAD_REQUEST = 400,
    RIL_IMSSIPCAUSE_UNAUTHORIZED = 401,
    RIL_IMSSIPCAUSE_PAYMENT_REQUIRED = 402,
    RIL_IMSSIPCAUSE_FORBIDDEN = 403,
    RIL_IMSSIPCAUSE_NOT_FOUND = 404,
    RIL_IMSSIPCAUSE_METHOD_NOT_ALLOWED = 405,
    RIL_IMSSIPCAUSE_NOT_ACCEPTABLE = 406,
    RIL_IMSSIPCAUSE_PROXY_AUTHENTICATION_REQUIRED = 407,
    RIL_IMSSIPCAUSE_REQUEST_TIMEOUT = 408,
    RIL_IMSSIPCAUSE_GONE = 410,
    RIL_IMSSIPCAUSE_REQUEST_ENTITY_TOO_LARGE = 413,
    RIL_IMSSIPCAUSE_REQUEST_URI_TOO_LONG = 414,
    RIL_IMSSIPCAUSE_UNSUPPORTED_MEDIA_TYPE = 415,
    RIL_IMSSIPCAUSE_UNSUPPORTED_URI_SCHEME = 416,
    RIL_IMSSIPCAUSE_BAD_EXTENSION = 420,
    RIL_IMSSIPCAUSE_EXTENSION_REQUIRED = 421,
    RIL_IMSSIPCAUSE_INTERVAL_TOO_BRIEF = 423,
    RIL_IMSSIPCAUSE_TEMPORARILY_UNAVAILABLE = 480,
    RIL_IMSSIPCAUSE_CALL_OR_TRANSACTION_DOES_NOT_EXIST = 481,
    RIL_IMSSIPCAUSE_LOOP_DETECTED = 482,
    RIL_IMSSIPCAUSE_TOO_MANY_HOPS = 483,
    RIL_IMSSIPCAUSE_ADDRESS_INCOMPLETE = 484,
    RIL_IMSSIPCAUSE_AMBIGUOUS = 485,
    RIL_IMSSIPCAUSE_BUSY_HERE = 486,
    RIL_IMSSIPCAUSE_REQUEST_TERMINATED = 487,
    RIL_IMSSIPCAUSE_NOT_ACCEPTABLE_HERE = 488,
    RIL_IMSSIPCAUSE_REQUEST_PENDING = 491,
    RIL_IMSSIPCAUSE_UNDECIPHERABLE = 493,
    RIL_IMSSIPCAUSE_SERVER_INTERNAL_ERROR = 500,
    RIL_IMSSIPCAUSE_NOT_IMPLEMENTED = 501,
    RIL_IMSSIPCAUSE_BAD_GATEWAY = 502,
    RIL_IMSSIPCAUSE_SERVICE_UNAVAILABLE = 503,
    RIL_IMSSIPCAUSE_SERVER_TIMEOUT = 504,
    RIL_IMSSIPCAUSE_VERSION_NOT_SUPPORTED = 505,
    RIL_IMSSIPCAUSE_MESSAGE_TOO_LARGE = 513,
    RIL_IMSSIPCAUSE_BUSY_EVERYWHERE = 600,
    RIL_IMSSIPCAUSE_DECLINE = 603,
    RIL_IMSSIPCAUSE_DOES_NOT_EXIST_ANYWHERE = 604,
    RIL_IMSSIPCAUSE_NOT_ACCEPTABLE_PARTIAL = 606
} RILIMSSIPCAUSECODE;

typedef enum RILIMSSIPREASON {
    RIL_IMSSIPREASON_NONE = 0,
    RIL_IMSSIPREASON_NOT_AUTHORIZED_FOR_SERVICE = 1,
    RIL_IMSSIPREASON_MAX = RIL_IMSSIPREASON_NOT_AUTHORIZED_FOR_SERVICE
} RILIMSSIPREASON;

typedef struct RILIMSSIPCAUSE {
    DWORD dwCauseValue;
    DWORD dwReasonValue;
} RILIMSSIPCAUSE, *LPRILIMSSIPCAUSE;

typedef struct RILCALLDISCONNECTDETAILS {
    RILCALLDISCONNECTDETAILSDISCONNECTGROUP dwDisconnectGroup;
     union RILCAUSEUNION {
        
            RILGPPCAUSE unGPPCause;
        
            RILGPPREJECTCAUSE unGPPRejectCause;
        
            RILGPP2CAUSE unGPP2Cause;
        
            RILIMSSIPCAUSE unIMSSIPCause;
        
            RILCALLDISCONNECTDETAILSASCODE dwASCode;
        
            DWORD dwOtherCode;
    } causeUnion;
} RILCALLDISCONNECTDETAILS, *LPRILCALLDISCONNECTDETAILS;

typedef enum RILACCESSTECHNOLOGYPARAMMASK {
    RIL_PARAM_ACCTECH_SYSTEMTYPE = 0x00000001,
    RIL_PARAM_ACCTECH_SYSTEMKIND = 0x00000002,
    RIL_PARAM_ACCTECH_ALL = 0x00000003
} RILACCESSTECHNOLOGYPARAMMASK;

typedef enum RILEVDOKIND {
    RIL_EVDOKIND_REV0 = 0x00000001,
    RIL_EVDOKIND_REVA = 0x00000002,
    RIL_EVDOKIND_REVB = 0x00000003,
    RIL_EVDOKIND_MAX = RIL_EVDOKIND_REVB
} RILEVDOKIND;

typedef enum RILGSMKIND {
    RIL_GSMKIND_GSM = 0x00000001,
    RIL_GSMKIND_GPRS = 0x00000002,
    RIL_GSMKIND_EDGE = 0x00000003,
    RIL_GSMKIND_MAX = RIL_GSMKIND_EDGE
} RILGSMKIND;

typedef enum RILUMTSKIND {
    RIL_UMTSKIND_UMTS = 0x00000001,
    RIL_UMTSKIND_HSDPA = 0x00000002,
    RIL_UMTSKIND_HSUPA = 0x00000003,
    RIL_UMTSKIND_HSPAPLUS = 0x00000004,
    RIL_UMTSKIND_DC_HSPAPLUS = 0x00000005,
    RIL_UMTSKIND_HSPAPLUS_64QAM = 0x00000006,
    RIL_UMTSKIND_MAX = RIL_UMTSKIND_HSPAPLUS_64QAM
} RILUMTSKIND;

typedef enum RILTDSCDMAKIND {
    RIL_TDSCDMAKIND_UMTS = 0x00000001,
    RIL_TDSCDMAKIND_HSDPA = 0x00000002,
    RIL_TDSCDMAKIND_HSUPA = 0x00000003,
    RIL_TDSCDMAKIND_HSPAPLUS = 0x00000004,
    RIL_TDSCDMAKIND_DC_HSPAPLUS = 0x00000005,
    RIL_TDSCDMAKIND_MAX = RIL_TDSCDMAKIND_DC_HSPAPLUS
} RILTDSCDMAKIND;

typedef enum RILLTEKIND {
    RIL_LTEKIND_FDD = 0x00000001,
    RIL_LTEKIND_TDD = 0x00000002,
    RIL_LTEKIND_MAX = RIL_LTEKIND_TDD
} RILLTEKIND;

typedef struct RILACCESSTECHNOLOGY {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwSystemType;
     union RILACCESSTECHNOLOGYKINDUNION {
        
            RILEVDOKIND dwEvdoKind;
        
            RILGSMKIND dwGsmKind;
        
            RILUMTSKIND dwUmtsKind;
        
            RILTDSCDMAKIND dwTdscdmaKind;
        
            RILLTEKIND dwLteKind;
    } kindUnion;
} RILACCESSTECHNOLOGY, *LPRILACCESSTECHNOLOGY;

typedef enum RILREGSTAT {
    RIL_REGSTAT_UNKNOWN = 0x00000000,
    RIL_REGSTAT_UNREGISTERED = 0x00000001,
    RIL_REGSTAT_HOME = 0x00000002,
    RIL_REGSTAT_ATTEMPTING = 0x00000003,
    RIL_REGSTAT_DENIED = 0x00000004,
    RIL_REGSTAT_ROAMING = 0x00000005,
    RIL_REGSTAT_ROAMING_DOMESTIC = 0x00000006,
    RIL_REGSTAT_MAX = RIL_REGSTAT_ROAMING_DOMESTIC
} RILREGSTAT;

typedef enum RILPERSOFEATURE {
    RIL_PERSOFEATURE_3GPP_NET = 0x00000001,
    RIL_PERSOFEATURE_3GPP_NETSUB = 0x00000002,
    RIL_PERSOFEATURE_3GPP_SP = 0x00000004,
    RIL_PERSOFEATURE_3GPP_CORP = 0x00000008,
    RIL_PERSOFEATURE_3GPP_USIM = 0x00000010,
    RIL_PERSOFEATURE_3GPP2_NETTYPE1 = 0x00000020,
    RIL_PERSOFEATURE_3GPP2_NETTYPE2 = 0x00000040,
    RIL_PERSOFEATURE_3GPP2_HRPD = 0x00000080,
    RIL_PERSOFEATURE_3GPP2_SP = 0x00000100,
    RIL_PERSOFEATURE_3GPP2_CORP = 0x00000200,
    RIL_PERSOFEATURE_3GPP2_UIM = 0x00000400,
    RIL_PERSOFEATURE_ALL = 0x000007FF
} RILPERSOFEATURE;

typedef enum RILINFOCLASS {
    RIL_INFOCLASS_NONE = 0x00000000,
    RIL_INFOCLASS_VOICE = 0x00000001,
    RIL_INFOCLASS_DATA = 0x00000002,
    RIL_INFOCLASS_FAX = 0x00000004,
    RIL_INFOCLASS_SMS = 0x00000008,
    RIL_INFOCLASS_DATACIRCUITSYNC = 0x00000010,
    RIL_INFOCLASS_DATACIRCUITASYNC = 0x00000020,
    RIL_INFOCLASS_PACKETACCESS = 0x00000040,
    RIL_INFOCLASS_PADACCESS = 0x00000080,
    RIL_INFOCLASS_ALL = 0x000000FF
} RILINFOCLASS;

typedef enum RILCALLTYPE {
    RIL_CALLTYPE_UNKNOWN = 0x00000000,
    RIL_CALLTYPE_VOICE = 0x00000001,
    RIL_CALLTYPE_DATA = 0x00000002,
    RIL_CALLTYPE_FAX = 0x00000003,
    RIL_CALLTYPE_PTT = 0x00000004,
    RIL_CALLTYPE_VT = 0x00000005,
    RIL_CALLTYPE_USSD = 0x00000006,
    RIL_CALLTYPE_SUPSVC = 0x00000007,
    RIL_CALLTYPE_IMS = 0x00000008,
    RIL_CALLTYPE_MAX = RIL_CALLTYPE_IMS
} RILCALLTYPE;

typedef enum RILCALLMEDIATYPE {
    RIL_CALLMEDIATYPE_UNKNOWN = 0x00000000,
    RIL_CALLMEDIATYPE_AUDIO = 0x00000001,
    RIL_CALLMEDIATYPE_VIDEO = 0x00000002,
    RIL_CALLMEDIATYPE_CUSTOM = 0x00000003,
    RIL_CALLMEDIATYPE_MAX = RIL_CALLMEDIATYPE_CUSTOM
} RILCALLMEDIATYPE;

typedef struct RILCALLMEDIAID {
    RILCALLMEDIATYPE dwType;
    DWORD dwID;
} RILCALLMEDIAID, *LPRILCALLMEDIAID;

typedef enum RILCALLAUDIOMEDIASTATEPARAMMASK {
    RIL_PARAM_CALLAUDIO_SOURCE = 0x00000001,
    RIL_PARAM_CALLAUDIO_QUALITY = 0x00000002,
    RIL_PARAM_CALLAUDIO_FLAGS = 0x00000004,
    RIL_PARAM_CALLAUDIO_ALL = 0x00000007
} RILCALLAUDIOMEDIASTATEPARAMMASK;

typedef enum RILCALLAUDIOSOURCE {
    RIL_CALLAUDIOSOURCE_CIRCUIT = 0x00000001,
    RIL_CALLAUDIOSOURCE_PKT_MODEM = 0x00000002,
    RIL_CALLAUDIOSOURCE_PKT_APP = 0x00000003,
    RIL_CALLAUDIOSOURCE_MAX = RIL_CALLAUDIOSOURCE_PKT_APP
} RILCALLAUDIOSOURCE;

typedef enum RILCALLAUDIOQUALITY {
    RIL_CALLAUDIOQUALITY_LOW = 0x00000001,
    RIL_CALLAUDIOQUALITY_STANDARD = 0x00000002,
    RIL_CALLAUDIOQUALITY_HIGH = 0x00000003,
    RIL_CALLAUDIOQUALITY_MAX = RIL_CALLAUDIOQUALITY_HIGH
} RILCALLAUDIOQUALITY;

typedef enum RILCALLMEDIAAUDIOFLAGS {
    RIL_CALLMEDIAAUDIOFLAG_NONE = 0x00000000,
    RIL_CALLMEDIAAUDIOFLAG_TEMPORARILY_UNAVAILABLE = 0x00000001,
    RIL_CALLMEDIAAUDIOFLAG_ALL = 0x00000001
} RILCALLMEDIAAUDIOFLAGS;

typedef struct RILCALLAUDIOMEDIASTATE {
    DWORD dwParams;
    RILCALLAUDIOSOURCE dwAudioSource;
    RILCALLAUDIOQUALITY dwAudioQuality;
    DWORD dwFlags;
} RILCALLAUDIOMEDIASTATE, *LPRILCALLAUDIOMEDIASTATE;

typedef struct RILCALLCUSTOMMEDIASTATE {
    DWORD dwCustomStateSpecific[1];
} RILCALLCUSTOMMEDIASTATE, *LPRILCALLCUSTOMMEDIASTATE;

typedef enum RILCALLMEDIADIRECTION {
    RIL_CALLMEDIADIRECTION_NONE = 0x00000000,
    RIL_CALLMEDIADIRECTION_RX = 0x00000001,
    RIL_CALLMEDIADIRECTION_TX = 0x00000002,
    RIL_CALLMEDIADIRECTION_RXTX = 0x00000003,
    RIL_CALLMEDIADIRECTION_MAX = RIL_CALLMEDIADIRECTION_RXTX
} RILCALLMEDIADIRECTION;

typedef enum RILCALLMEDIAVIDEOFLAGPARAMMASK {
    RIL_CALLMEDIAVIDEOFLAG_NONE = 0x00000000,
    RIL_CALLMEDIAVIDEOFLAG_CAPABILITY_UNKNOWN = 0x00000001,
    RIL_CALLMEDIAVIDEOFLAG_PAUSE = 0x00000002,
    RIL_CALLMEDIAVIDEOFLAG_TEMPORARILY_UNAVAILABLE = 0x00000004,
    RIL_CALLMEDIAVIDEOFLAG_ALL = 0x00000007
} RILCALLMEDIAVIDEOFLAGPARAMMASK;

typedef enum RILCALLVIDEOMEDIASTATEPARAMMASK {
    RIL_PARAM_CALLVIDEO_PEERCAPABILITIES = 0x00000001,
    RIL_PARAM_CALLVIDEO_FLAGS = 0x00000002,
    RIL_PARAM_CALLVIDEO_CONTEXTID = 0x00000004,
    RIL_PARAM_CALLVIDEO_ALL = 0x00000007
} RILCALLVIDEOMEDIASTATEPARAMMASK;

typedef struct RILCALLVIDEOMEDIASTATE {
    DWORD dwParams;
    RILCALLMEDIADIRECTION dwPeerCapabilities;
    DWORD dwFlags;
    DWORD dwContextID;
} RILCALLVIDEOMEDIASTATE, *LPRILCALLVIDEOMEDIASTATE;

typedef struct RILCALLMEDIASTATE {
    RILCALLMEDIADIRECTION dwDirection;
    RILCALLMEDIATYPE dwCallMediaType;
     union RILCALLMEDIASTATEUNION {
        
            RILCALLAUDIOMEDIASTATE stAudioState;
        
            RILCALLVIDEOMEDIASTATE stVideoState;
        
            RILCALLCUSTOMMEDIASTATE dwCustomStateSpecific;
        
            DWORD pad[16];
    } mediaStateUnion;
} RILCALLMEDIASTATE, *LPRILCALLMEDIASTATE;

typedef enum RILCALLMEDIAOFFERANSWERPARAMMASK {
    RIL_PARAM_CMOA_ID = 0x00000001,
    RIL_PARAM_CMOA_CHANGE = 0x00000002,
    RIL_PARAM_CMOA_ACTION = 0x00000004,
    RIL_PARAM_CMOA_OLD_STATE = 0x00000008,
    RIL_PARAM_CMOA_NEW_STATE = 0x00000010,
    RIL_PARAM_CMOA_ALL = 0x0000001F
} RILCALLMEDIAOFFERANSWERPARAMMASK;

typedef enum RILCALLMEDIAOFFERACTION {
    RIL_CALLMEDIAOFFERACTION_NONE = 0x00000000,
    RIL_CALLMEDIAOFFERACTION_ERROR = 0x00000001,
    RIL_CALLMEDIAOFFERACTION_REJECT = 0x00000002,
    RIL_CALLMEDIAOFFERACTION_ASK = 0x00000003,
    RIL_CALLMEDIAOFFERACTION_ACCEPT = 0x00000004,
    RIL_CALLMEDIAOFFERACTION_CANCEL = 0x00000005,
    RIL_CALLMEDIAOFFERACTION_MAX = RIL_CALLMEDIAOFFERACTION_CANCEL
} RILCALLMEDIAOFFERACTION;

typedef struct RILCALLMEDIAOFFERANSWER {
    DWORD cbSize;
    DWORD dwParams;
    RILCALLMEDIAID stID;
    BOOL fChange;
    RILCALLMEDIAOFFERACTION dwMediaAction;
    RILCALLMEDIASTATE stOldState;
    RILCALLMEDIASTATE stNewState;
} RILCALLMEDIAOFFERANSWER, *LPRILCALLMEDIAOFFERANSWER;

typedef enum RILCALLMEDIAOFFERANSWERTYPE {
    RIL_CALLMEDIAOFFERANSWERTYPE_UNKNOWN = 0x00000000,
    RIL_CALLMEDIAOFFERANSWERTYPE_CURRENT = 0x00000001,
    RIL_CALLMEDIAOFFERANSWERTYPE_OFFER = 0x00000002,
    RIL_CALLMEDIAOFFERANSWERTYPE_ANSWER = 0x00000003,
    RIL_CALLMEDIAOFFERANSWERTYPE_PEER_OFFER = 0x00000004,
    RIL_CALLMEDIAOFFERANSWERTYPE_PEER_ANSWER = 0x00000005,
    RIL_CALLMEDIAOFFERANSWERTYPE_MAX = RIL_CALLMEDIAOFFERANSWERTYPE_PEER_ANSWER
} RILCALLMEDIAOFFERANSWERTYPE;

typedef struct RILCALLMEDIAOFFERANSWERSET {
    DWORD cbSize;
    RILCALLMEDIAOFFERANSWERTYPE dwType;
    DWORD dwNumberOfItems;
    RILCALLMEDIAOFFERANSWER stOfferAnswer[4];
} RILCALLMEDIAOFFERANSWERSET, *LPRILCALLMEDIAOFFERANSWERSET;

typedef enum RILCALLHANDOVERSTATEPARAMMASK {
    RIL_PARAM_HANDOVER_PHASE = 0x00000001,
    RIL_PARAM_HANDOVER_OLD_TYPE = 0x00000002,
    RIL_PARAM_HANDOVER_NEW_TYPE = 0x00000004,
    RIL_PARAM_HANDOVER_3GPPCAUSE = 0x00000008,
    RIL_PARAM_HANDOVER_ALL = 0x0000000F
} RILCALLHANDOVERSTATEPARAMMASK;

typedef enum RILCALLHANDOVERPHASE {
    RIL_CALLHANDOVERPHASE_STARTED = 0x00000001,
    RIL_CALLHANDOVERPHASE_COMPLETED = 0x00000002,
    RIL_CALLHANDOVERPHASE_FAILED = 0x00000003,
    RIL_CALLHANDOVERPHASE_CANCELLED = 0x00000004,
    RIL_CALLHANDOVERPHASE_MAX = RIL_CALLHANDOVERPHASE_CANCELLED
} RILCALLHANDOVERPHASE;

typedef struct RILCALLHANDOVERSTATE {
    DWORD cbSize;
    DWORD dwParams;
    RILCALLHANDOVERPHASE dwPhase;
    RILCALLTYPE dwOldType;
    RILCALLTYPE dwNewType;
    DWORD dw3gppCause;
} RILCALLHANDOVERSTATE, *LPRILCALLHANDOVERSTATE;

typedef enum RILIMSSYSTEMTYPE {
    RIL_IMSSYSTEMTYPE_UNKNOWN = 0x00000000,
    RIL_IMSSYSTEMTYPE_WIFI = 0x00000001,
    RIL_IMSSYSTEMTYPE_LTE = 0x00000002,
    RIL_IMSSYSTEMTYPE_MAX = RIL_IMSSYSTEMTYPE_LTE
} RILIMSSYSTEMTYPE;

typedef struct RILIMSHANDOVERATTEMPT {
    DWORD cbSize;
    RILIMSSYSTEMTYPE dwOldSystemType;
    RILIMSSYSTEMTYPE dwDestSystemType;
    HRESULT hrHandOverResult;
} RILIMSHANDOVERATTEMPT, *LPRILIMSHANDOVERATTEMPT;

typedef enum RILCAPSTYPE {
    RIL_CAPSTYPE_PERSOLOCKSUPPORT = 0x01,
    RIL_CAPSTYPE_PERSOLOCKPWDLENGTH = 0x02,
    RIL_CAPSTYPE_PBMAXREAD = 0x03,
    RIL_CAPSTYPE_PBSTORELOCATIONS = 0x04,
    RIL_CAPSTYPE_RADIOCONFIGURATIONS = 0x05,
    RIL_CAPSTYPE_SIGNALQUALITYIMPLEMENTATION = 0x06,
    RIL_CAPSTYPE_NITZNOTIFICATION = 0x07,
    RIL_CAPSTYPE_CALLSUPPORT = 0x09,
    RIL_CAPSTYPE_SMSSUPPORT = 0x0A,
    RIL_CAPSTYPE_ARG_SMALLEST = RIL_CAPSTYPE_PERSOLOCKSUPPORT,
    RIL_CAPSTYPE_ARG_LARGEST = RIL_CAPSTYPE_SMSSUPPORT,
    RIL_CAPSTYPE_MAX = RIL_CAPSTYPE_SMSSUPPORT
} RILCAPSTYPE;

typedef struct RILDRVNOTIFICATION {
    DWORD cbSize;
    DWORD cbSizeNeeded;
    DWORD dwCode;
    HRESULT hrCmdID;
    DWORD dwDataSize;
    BYTE pbData[1];
} RILDRVNOTIFICATION, *LPRILDRVNOTIFICATION;

typedef enum RILERRORDETAILSPARAMMASK {
    RIL_PARAM_ERR_CAUSE = 0x01
} RILERRORDETAILSPARAMMASK;

typedef struct RILERRORDETAILS {
    DWORD cbSize;
    DWORD dwParams;
    HRESULT hResult;
    DWORD dw3gppCause;
} RILERRORDETAILS, *LPRILERRORDETAILS;

typedef struct RILGETDRIVERVERSIONPARAMS {
    DWORD dwMinVersion;
    DWORD dwMaxVersion;
} RILGETDRIVERVERSIONPARAMS, *LPRILGETDRIVERVERSIONPARAMS;

typedef enum RILDEVICEINFORMATION {
    RIL_DEVICEINFO_MANUFACTURER = 0x01,
    RIL_DEVICEINFO_MODEL = 0x02,
    RIL_DEVICEINFO_REVISION = 0x03,
    RIL_DEVICEINFO_SERIALNUMBER_GW = 0x04,
    RIL_DEVICEINFO_SERIALNUMBER_CDMA = 0x05,
    RIL_DEVICEINFO_ARG_SMALLEST = RIL_DEVICEINFO_MANUFACTURER,
    RIL_DEVICEINFO_ARG_LARGEST = RIL_DEVICEINFO_SERIALNUMBER_CDMA,
    RIL_DEVICEINFO_MIN = RIL_DEVICEINFO_MANUFACTURER,
    RIL_DEVICEINFO_MAX = RIL_DEVICEINFO_SERIALNUMBER_CDMA
} RILDEVICEINFORMATION;

typedef struct RILGETDEVICEINFOPARAMS {
    DWORD dwExecutor;
    RILDEVICEINFORMATION dwId;
} RILGETDEVICEINFOPARAMS, *LPRILGETDEVICEINFOPARAMS;

typedef enum RILIMSSERVICE {
    RIL_IMS_SERVICE_SMS = 0x00000001,
    RIL_IMS_SERVICE_VOICE = 0x00000002,
    RIL_IMS_SERVICE_VIDEO = 0x00000004,
    RIL_IMS_SERVICE_CUSTOM = 0x00000008,
    RIL_IMS_SERVICE_SUPSVC = 0x00000010,
    RIL_IMS_SERVICE_RCS = 0x00000020,
    RIL_IMS_SERVICE_USSD = 0x00000040,
    RIL_IMS_SERVICE_E_VOICE = 0x00000080,
    RIL_IMS_SERVICE_ALL = 0x000000FF
} RILIMSSERVICE;

typedef enum RILSMSFORMAT {
    RIL_SMSFORMAT_NONE = 0x0,
    RIL_SMSFORMAT_3GPP = 0x1,
    RIL_SMSFORMAT_3GPP2 = 0x2,
    RIL_SMSFORMAT_MAX = RIL_SMSFORMAT_3GPP2
} RILSMSFORMAT;

typedef enum RILDMCONFIGINFOITEM {
    RILDMCONFIG_SIP_TIMER_T1 = 0x00000001,
    RILDMCONFIG_SIP_TIMER_T2 = 0x00000002,
    RILDMCONFIG_SIP_TIMER_F = 0x00000003,
    RILDMCONFIG_SMS_FORMAT_TYPE = 0x00000004,
    RILDMCONFIG_DOMAIN_NAME = 0x00000005,
    RILDMCONFIG_SMS_OVER_IP_NW_INDICATION = 0x00000006,
    RILDMCONFIG_IMS_TEST_MODE_STATUS = 0x00000007,
    RILDMCONFIG_PCSCF_ADDRESS = 0x00000008,
    RILDMCONFIG_PCSCF_PORT_NUMBER = 0x00000009,
    RILDMCONFIG_MD5_AUTH = 0x0000000A,
    RILDMCONFIG_MULTIPARTY_SERVER = 0x0000000B,
    RILDMCONFIG_REQUEST_CONTEXT = 0x0000000C,
    RILDMCONFIG_IMS_NAI = 0x0000000D,
    RILDMCONFIG_SIP_SESSION_TIMER = 0x0000000E,
    RILDMCONFIG_SIP_SESSION_TIMER_MIN = 0x0000000F,
    RILDMCONFIG_AMR_WB_ENABLE = 0x00000010,
    RILDMCONFIG_AMR_SRC_CTL_RATE = 0x00000011,
    RILDMCONFIG_AMR_WB_SRC_CTL_RATE = 0x00000012,
    RILDMCONFIG_AMR_MODE_SET = 0x00000013,
    RILDMCONFIG_AMR_WB_MODE_SET = 0x00000014,
    RILDMCONFIG_RINGING_TIMER = 0x00000015,
    RILDMCONFIG_RINGBACK_TIMER = 0x00000016,
    RILDMCONFIG_RTC_INACTIVITY_TIMER = 0x00000017,
    RILDMCONFIG_UDP_KEEPALIVE_TIMER = 0x00000018,
    RILDMCONFIG_IMS_VOICE_ENABLED = 0x00000019,
    RILDMCONFIG_IMS_VIDEO_ENABLED = 0x0000001A,
    RILDMCONFIG_IMS_NW_ENABLED_FLAGS = 0x0000001B,
    RILDMCONFIG_IMS_IRAT_REG_DELAY = 0x0000001C,
    RILDMCONFIG_1XRTT_FALLBACK_REDIAL_TIMER = 0x0000001D,
    RILDMCONFIG_1XRTT_FALLBACK_REDIAL_ENABLE = 0x0000001E,
    RILDMCONFIG_IMS_PRESENCE_ENABLED = 0x0000001F,
    RILDMCONFIG_MAX = RILDMCONFIG_IMS_PRESENCE_ENABLED
} RILDMCONFIGINFOITEM;

typedef enum RILIMSNWENABLEDFLAGS {
    RIL_IMS_NW_ENABLED_FLAG_NONE = 0x00000000,
    RIL_IMS_NW_ENABLED_FLAG_PROVISION = 0x00000001,
    RIL_IMS_NW_ENABLED_FLAG_VOICE = 0x00000002,
    RIL_IMS_NW_ENABLED_FLAG_VIDEO = 0x00000004,
    RIL_IMS_NW_ENABLED_FLAG_EAB = 0x00000008,
    RIL_IMS_NW_ENABLED_FLAG_ALL = 0x0000000F
} RILIMSNWENABLEDFLAGS;

typedef enum RILDMCONFIGINFOTYPE {
    RIL_DMCV_TYPE_NONE = 0x00000000,
    RIL_DMCV_TYPE_BOOLEAN = 0x00000001,
    RIL_DMCV_TYPE_DWORD = 0x00000002,
    RIL_DMCV_TYPE_STRING = 0x00000003,
    RIL_DMCV_TYPE_MAX = RIL_DMCV_TYPE_STRING
} RILDMCONFIGINFOTYPE;

typedef struct RILDMCONFIGINFOVALUE {
    DWORD cbSize;
    RILDMCONFIGINFOTYPE dwType;
    BOOL fValue;
    DWORD dwValue;
    WCHAR wszValue[256];
} RILDMCONFIGINFOVALUE, *LPRILDMCONFIGINFOVALUE;

typedef struct RILGETDMPROFILECONFIGINFOPARAMS {
    DWORD dwExecutor;
    RILDMCONFIGINFOITEM dwConfigItem;
} RILGETDMPROFILECONFIGINFOPARAMS, *LPRILGETDMPROFILECONFIGINFOPARAMS;

typedef struct RILSETDMPROFILECONFIGINFOPARAMS {
    DWORD dwExecutor;
    RILDMCONFIGINFOITEM dwConfigItem;
    RILDMCONFIGINFOVALUE rciValue;
} RILSETDMPROFILECONFIGINFOPARAMS, *LPRILSETDMPROFILECONFIGINFOPARAMS;

typedef enum RILRADIOPRESENCE {
    RIL_RADIOPRESENCE_NOTPRESENT = 0x1,
    RIL_RADIOPRESENCE_PRESENT = 0x2,
    RIL_RADIOPRESENCE_MAX = RIL_RADIOPRESENCE_PRESENT
} RILRADIOPRESENCE;

typedef enum RILEQUIPMENTSTATE {
    RIL_EQSTATE_MINIMUM = 0x00000001,
    RIL_EQSTATE_FULL = 0x00000002,
    RIL_EQSTATE_SHUTDOWN = 0x00000003,
    RIL_EQSTATE_MAX = RIL_EQSTATE_SHUTDOWN
} RILEQUIPMENTSTATE;

typedef enum RILNOTIFICATIONFILTERMASK {
    RIL_NFS_NONE = 0x00000000,
    RIL_NFS_SIGNALQUALITY = 0x00000001,
    RIL_NFS_REGSTATUS_RATKIND = 0x00000002,
    RIL_NFS_LOCATIONUPDATE = 0x00000004,
    RIL_NFS_ALL = 0x00000007
} RILNOTIFICATIONFILTERMASK;

typedef struct RILSETNOTIFICATIONFILTERSTATEPARAMS {
    DWORD dwFilterMask;
    DWORD dwFilterState;
} RILSETNOTIFICATIONFILTERSTATEPARAMS, *LPRILSETNOTIFICATIONFILTERSTATEPARAMS;

typedef enum RILRESETMODEMKIND {
    RIL_RESETMODEMKIND_NORMAL = 0x00000001,
    RIL_RESETMODEMKIND_ABRUPT = 0x00000002,
    RIL_RESETMODEMKIND_MAX = RIL_RESETMODEMKIND_ABRUPT
} RILRESETMODEMKIND;

typedef enum RILMODEMRESETSTATE {
    RIL_MODEMRESETSTATE_STARTED = 0x00000001,
    RIL_MODEMRESETSTATE_RECOVERED = 0x00000002,
    RIL_MODEMRESETSTATE_FAILED = 0x00000003,
    RIL_MODEMRESETSTATE_MAX = RIL_MODEMRESETSTATE_FAILED
} RILMODEMRESETSTATE;

typedef enum RILUICCSLOTINFOPARAMMASK {
    RIL_PARAM_SLOTINFO_NUMSLOTS = 0x00000001,
    RIL_PARAM_SLOTINFO_SLOTSTATE = 0x00000002,
    RIL_PARAM_SLOTINFO_ALL = 0x00000003
} RILUICCSLOTINFOPARAMMASK;

typedef enum RILUICCSLOTSTATE {
    RIL_UICCSLOT_OFF_EMPTY = 0x01,
    RIL_UICCSLOT_OFF = 0x02,
    RIL_UICCSLOT_EMPTY = 0x03,
    RIL_UICCSLOT_NOT_READY = 0x04,
    RIL_UICCSLOT_ACTIVE = 0x05,
    RIL_UICCSLOT_ERROR = 0x06,
    RIL_UICCSLOT_MAX = RIL_UICCSLOT_ERROR
} RILUICCSLOTSTATE;

typedef struct RILUICCSLOTINFO {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwNumOfUiccSlots;
    RILUICCSLOTSTATE dwSlotState[1];
} RILUICCSLOTINFO, *LPRILUICCSLOTINFO;

typedef enum RILUICCAPPINFOPARAMMASK {
    RIL_PARAM_UICCAPPINFO_HUICCAPP = 0x00000001,
    RIL_PARAM_UICCAPPINFO_APPTYPE = 0x00000002,
    RIL_PARAM_UICCAPPINFO_APPIDLENGTH = 0x00000004,
    RIL_PARAM_UICCAPPINFO_APPID = 0x00000008,
    RIL_PARAM_UICCAPPINFO_APPNAMELENGTH = 0x00000010,
    RIL_PARAM_UICCAPPINFO_APPNAME = 0x00000020,
    RIL_PARAM_UICCAPPINFO_NUMPINS = 0x00000040,
    RIL_PARAM_UICCAPPINFO_PINREF = 0x00000080,
    RIL_PARAM_UICCAPPINFO_ALL = 0x000000FF
} RILUICCAPPINFOPARAMMASK;

typedef enum RILUICCAPPTYPE {
    RIL_UICCAPPTYPE_UNKNOWN = 0x00000001,
    RIL_UICCAPPTYPE_MF = 0x00000002,
    RIL_UICCAPPTYPE_MF_SIM = 0x00000003,
    RIL_UICCAPPTYPE_MF_RUIM = 0x00000004,
    RIL_UICCAPPTYPE_USIM = 0x00000005,
    RIL_UICCAPPTYPE_CSIM = 0x00000006,
    RIL_UICCAPPTYPE_ISIM = 0x00000007,
    RIL_UICCAPPTYPE_MAX = RIL_UICCAPPTYPE_ISIM
} RILUICCAPPTYPE;

typedef struct RILUICCAPPINFO {
    DWORD cbSize;
    DWORD dwParams;
    HUICCAPP hUiccApp;
    RILUICCAPPTYPE dwUiccAppType;
    DWORD dwAppIdLength;
    BYTE bAppId[32];
    DWORD dwAppNameLength;
    char cszAppName[256];
    DWORD dwNumPins;
    BYTE bPinRef[8];
} RILUICCAPPINFO, *LPRILUICCAPPINFO;

typedef enum RILUICCCARDINFOPARAMMASK {
    RIL_PARAM_CARDINFO_ISVIRTUAL = 0x00000001,
    RIL_PARAM_CARDINFO_ICCID = 0x00000002,
    RIL_PARAM_CARDINFO_NUMAPPS = 0x00000004,
    RIL_PARAM_CARDINFO_APPINFO = 0x00000008,
    RIL_PARAM_CARDINFO_ALL = 0x0000000F
} RILUICCCARDINFOPARAMMASK;

typedef struct RILUICCCARDINFO {
    DWORD cbSize;
    DWORD dwParams;
    BOOL fIsVirtualCard;
    BYTE IccId[10];
    DWORD dwNumApps;
    RILUICCAPPINFO AppInfo[1];
} RILUICCCARDINFO, *LPRILUICCCARDINFO;

typedef struct RILSETSLOTPOWERPARAMS {
    DWORD dwSlotIndex;
    BOOL fPowerOn;
} RILSETSLOTPOWERPARAMS, *LPRILSETSLOTPOWERPARAMS;

typedef enum RILUICCFILELOCKSTATUSPARAMMASK {
    RIL_PARAM_UFLS_ACCESSCONDITION = 0x00000001,
    RIL_PARAM_UFLS_PINREFERENCE = 0x00000002,
    RIL_PARAM_UFLS_ALL = 0x00000003
} RILUICCFILELOCKSTATUSPARAMMASK;

typedef enum RILUICCFILELOCKSTATUSACCESSCONDITION {
    RIL_UICCFILEACCESSCONDITION_ALW = 0x00,
    RIL_UICCFILEACCESSCONDITION_PIN1 = 0x01,
    RIL_UICCFILEACCESSCONDITION_PIN2 = 0x02,
    RIL_UICCFILEACCESSCONDITION_RFU3 = 0x03,
    RIL_UICCFILEACCESSCONDITION_RFU4 = 0x04,
    RIL_UICCFILEACCESSCONDITION_ADM5 = 0x05,
    RIL_UICCFILEACCESSCONDITION_ADM6 = 0x06,
    RIL_UICCFILEACCESSCONDITION_NEV = 0x07,
    RIL_UICCFILEACCESSCONDITION_MAX = RIL_UICCFILEACCESSCONDITION_NEV
} RILUICCFILELOCKSTATUSACCESSCONDITION;

typedef struct RILUICCFILELOCKSTATUS {
    DWORD cbSize;
    DWORD dwParams;
    RILUICCFILELOCKSTATUSACCESSCONDITION dwAccessCondition;
    BYTE bPinRef[8];
} RILUICCFILELOCKSTATUS, *LPRILUICCFILELOCKSTATUS;

typedef enum RILUICCRECORDTYPE {
    RIL_UICCRECORDTYPE_UNKNOWN = 0x00000000,
    RIL_UICCRECORDTYPE_TRANSPARENT = 0x00000001,
    RIL_UICCRECORDTYPE_CYCLIC = 0x00000002,
    RIL_UICCRECORDTYPE_LINEAR = 0x00000003,
    RIL_UICCRECORDTYPE_BERTLV = 0x00000004,
    RIL_UICCRECORDTYPE_MASTER = 0x00000005,
    RIL_UICCRECORDTYPE_DEDICATED = 0x00000006,
    RIL_UICCRECORDTYPE_MAX = RIL_UICCRECORDTYPE_DEDICATED
} RILUICCRECORDTYPE;

typedef enum RILUICCRECORDSTATUSPARAMMASK {
    RIL_PARAM_URS_RECORDTYPE = 0x00000001,
    RIL_PARAM_URS_ITEMCOUNT = 0x00000002,
    RIL_PARAM_URS_SIZE = 0x00000004,
    RIL_PARAM_URS_FILELOCKSTATUS = 0x00000008,
    RIL_PARAM_URS_ALL = 0x0000000F
} RILUICCRECORDSTATUSPARAMMASK;

typedef struct RILUICCRECORDSTATUS {
    DWORD cbSize;
    DWORD dwParams;
    RILUICCRECORDTYPE dwRecordType;
    DWORD dwItemCount;
    DWORD dwSize;
    RILUICCFILELOCKSTATUS fileLockStatus[4];
} RILUICCRECORDSTATUS, *LPRILUICCRECORDSTATUS;

typedef enum RILUICCCOMMAND {
    RIL_UICCCMD_READBINARY = 0x01,
    RIL_UICCCMD_READRECORD = 0x02,
    RIL_UICCCMD_UPDATEBINARY = 0x03,
    RIL_UICCCMD_UPDATERECORD = 0x04,
    RIL_UICCCMD_MAX = RIL_UICCCMD_UPDATERECORD
} RILUICCCOMMAND;

typedef enum RILUICCCMDPARAMETERSPARAMMASK {
    RIL_PARAM_SCP_FILEPATH = 0x00000001,
    RIL_PARAM_SCP_PARAM1 = 0x00000002,
    RIL_PARAM_SCP_PARAM2 = 0x00000004,
    RIL_PARAM_SCP_PARAM3 = 0x00000008,
    RIL_PARAM_SCP_ALL = 0x0000000F
} RILUICCCMDPARAMETERSPARAMMASK;

typedef struct RILUICCCMDPARAMETERS {
    DWORD cbSize;
    DWORD dwParams;
    RILUICCFILEPATH filePath;
    DWORD dwParameter1;
    DWORD dwParameter2;
    DWORD dwParameter3;
} RILUICCCMDPARAMETERS, *LPRILUICCCMDPARAMETERS;

typedef struct RILSENDRESTRICTEDUICCCMDPARAMS {
    DWORD cbSize;
    RILUICCCOMMAND dwCommand;
    RILUICCCMDPARAMETERS rscpParameters;
    BOOL fHasLockVerification;
    RILUICCLOCKCREDENTIAL lockVerification;
    DWORD dwDataSize;
    BYTE pbData[1];
} RILSENDRESTRICTEDUICCCMDPARAMS, *LPRILSENDRESTRICTEDUICCCMDPARAMS;

typedef enum RILUICCRESPONSEPARAMMASK {
    RIL_PARAM_SR_STATUSWORD1 = 0x0000001,
    RIL_PARAM_SR_STATUSWORD2 = 0x0000002,
    RIL_PARAM_SR_RESPONSESIZE = 0x0000004,
    RIL_PARAM_SR_RESPONSE = 0x0000008,
    RIL_PARAM_SR_ALL = 0x000000F
} RILUICCRESPONSEPARAMMASK;

typedef struct RILUICCRESPONSE {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwStatusWord1;
    DWORD dwStatusWord2;
    DWORD dwResponseSize;
    BYTE pbResponse[1];
} RILUICCRESPONSE, *LPRILUICCRESPONSE;

typedef struct RILUICCFILES {
    DWORD cbSize;
    DWORD dwNumFiles;
    RILUICCFILEPATH filePath[1];
} RILUICCFILES, *LPRILUICCFILES;

typedef enum RILUICCPRLID {
    RIL_UICC_PRLID_UNSPECIFIED = 0xFFFFFFFF
} RILUICCPRLID;

typedef enum RILIMSIPARAMMASK {
    RIL_PARAM_IMSI_IMSI = 0x00000001,
    RIL_PARAM_IMSI_MCC = 0x00000002,
    RIL_PARAM_IMSI_MNC = 0x00000004,
    RIL_PARAM_IMSI_ALL = 0x00000007
} RILIMSIPARAMMASK;

typedef struct RILIMSI {
    DWORD cbSize;
    DWORD dwParams;
    WCHAR wszImsi[16];
    DWORD dwMcc;
    DWORD dwMnc;
} RILIMSI, *LPRILIMSI;

typedef enum RILSUBSCRIBERINFOPARAMMASK {
    RIL_PARAM_SI_ADDRESS = 0x00000001,
    RIL_PARAM_SI_DESCRIPTION = 0x00000002,
    RIL_PARAM_SI_SERVICE = 0x00000004,
    RIL_PARAM_SI_ALL = 0x00000007
} RILSUBSCRIBERINFOPARAMMASK;

typedef enum RILSUBSCRIBERINFOSERVICE {
    RIL_SERVICE_UNKNOWN = 0x01,
    RIL_SERVICE_VOICE = 0x02,
    RIL_SERVICE_FAX = 0x03,
    RIL_SERVICE_OTHER = 0x04,
    RIL_SERVICE_MAX = RIL_SERVICE_OTHER
} RILSUBSCRIBERINFOSERVICE;

typedef struct RILSUBSCRIBERINFO {
    DWORD cbSize;
    DWORD dwParams;
    RILADDRESS raAddress;
    WCHAR wszDescription[256];
    RILSUBSCRIBERINFOSERVICE dwService;
} RILSUBSCRIBERINFO, *LPRILSUBSCRIBERINFO;

typedef struct RILUICCSUBSCRIBERNUMBERS {
    DWORD cbSize;
    DWORD dwNumSubscribers;
    RILSUBSCRIBERINFO rsiInfo[1];
} RILUICCSUBSCRIBERNUMBERS, *LPRILUICCSUBSCRIBERNUMBERS;

typedef struct RILUICCATRINFO {
    DWORD dwATRlength;
    BYTE bATR[36];
} RILUICCATRINFO, *LPRILUICCATRINFO;

typedef enum RILUICCCHANNELGROUP {
    RIL_UICCCHANNELGROUP_NFC = 0x00000001
} RILUICCCHANNELGROUP;

typedef struct RILOPENUICCLOGICALCHANNELPARAMS {
    DWORD dwSlotIndex;
    DWORD dwChannelGroup;
    DWORD dwAppIdLength;
    BYTE bAppId[32];
    DWORD dwSelectP2Arg;
} RILOPENUICCLOGICALCHANNELPARAMS, *LPRILOPENUICCLOGICALCHANNELPARAMS;

typedef enum RILOPENUICCLOGICALCHANNELPARAMMASK {
    RIL_PARAM_OULC_CHANNELID = 0x00000001,
    RIL_PARAM_OULC_SELECTRESPLENGTH = 0x00000002,
    RIL_PARAM_OULC_SELECTRESPONSE = 0x00000004,
    RIL_PARAM_OULC_ALL = 0x00000007
} RILOPENUICCLOGICALCHANNELPARAMMASK;

typedef struct RILOPENUICCLOGICALCHANNELINFO {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwChannelId;
    DWORD dwSelectResponseLength;
    BYTE bSelectResponse[1];
} RILOPENUICCLOGICALCHANNELINFO, *LPRILOPENUICCLOGICALCHANNELINFO;

typedef struct RILCLOSEUICCLOGICALCHANNELPARAMS {
    DWORD dwSlotIndex;
    DWORD dwChannelId;
} RILCLOSEUICCLOGICALCHANNELPARAMS, *LPRILCLOSEUICCLOGICALCHANNELPARAMS;

typedef struct RILCLOSEUICCLOGICALCHANNELGROUPPARAMS {
    DWORD dwSlotIndex;
    DWORD dwChannelGroup;
} RILCLOSEUICCLOGICALCHANNELGROUPPARAMS, *LPRILCLOSEUICCLOGICALCHANNELGROUPPARAMS;

typedef struct RILEXCHANGEUICCAPDUPARAMS {
    DWORD dwSlotIndex;
    DWORD dwChannelId;
    DWORD dwAPDULength;
    BYTE bAPDU[1];
} RILEXCHANGEUICCAPDUPARAMS, *LPRILEXCHANGEUICCAPDUPARAMS;

typedef enum RILEXCHANGEUICCAPDURESPONSEPARAMMASK {
    RIL_PARAM_EUAR_RESPONSEAPDULENGTH = 0x00000001,
    RIL_PARAM_EUAR_RESPONSEAPDU = 0x00000002,
    RIL_PARAM_EUAR_ALL = 0x00000003
} RILEXCHANGEUICCAPDURESPONSEPARAMMASK;

typedef struct RILEXCHANGEUICCAPDURESPONSE {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwResponseAPDULength;
    BYTE bResponseAPDU[1];
} RILEXCHANGEUICCAPDURESPONSE, *LPRILEXCHANGEUICCAPDURESPONSE;

typedef enum RILUICCAPPDATACHANGEENUM {
    RIL_UICCAPP_DATACHANGE_MSISDN = 0x00000001,
    RIL_UICCAPP_DATACHANGE_MBDN = 0x00000002,
    RIL_UICCAPP_DATACHANGE_EF_CSP_PLMN_UNSET = 0x00000003,
    RIL_UICCAPP_DATACHANGE_EF_CSP_PLMN_SET = 0x00000004,
    RIL_UICCAPP_DATACHANGE_ESNME = 0x00000005,
    RIL_UICCAPP_DATACHANGE_MAX = RIL_UICCAPP_DATACHANGE_ESNME
} RILUICCAPPDATACHANGEENUM;

typedef struct RILUICCAPPDATACHANGE {
    DWORD cbSize;
    HUICCAPP hUiccApp;
    RILUICCAPPDATACHANGEENUM dwDataChange;
} RILUICCAPPDATACHANGE, *LPRILUICCAPPDATACHANGE;

typedef enum RILCARDAPPADDEDPARAMMASK {
    RIL_PARAM_CARDAPPADDED_SLOTINDEX = 0x00000001,
    RIL_PARAM_CARDAPPADDED_UICCAPPINFO = 0x00000002,
    RIL_PARAM_CARDAPPADDED_ALL = 0x00000003
} RILCARDAPPADDEDPARAMMASK;

typedef struct RILCARDAPPADDED {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwSlotIndex;
    RILUICCAPPINFO rilUiccAppInfo;
} RILCARDAPPADDED, *LPRILCARDAPPADDED;

typedef enum RILPERSOLOCKSUPPORTCAPS {
    RIL_CAPS_PERSOFEATURE_3GPP_NET = 0x00000001,
    RIL_CAPS_PERSOFEATURE_3GPP_NETSUB = 0x00000002,
    RIL_CAPS_PERSOFEATURE_3GPP_SP = 0x00000004,
    RIL_CAPS_PERSOFEATURE_3GPP_CORP = 0x00000008,
    RIL_CAPS_PERSOFEATURE_3GPP_USIM = 0x00000010,
    RIL_CAPS_PERSOFEATURE_3GPP2_NETTYPE1 = 0x00000020,
    RIL_CAPS_PERSOFEATURE_3GPP2_NETTYPE2 = 0x00000040,
    RIL_CAPS_PERSOFEATURE_3GPP2_HRPD = 0x00000080,
    RIL_CAPS_PERSOFEATURE_3GPP2_SP = 0x00000100,
    RIL_CAPS_PERSOFEATURE_3GPP2_CORP = 0x00000200,
    RIL_CAPS_PERSOFEATURE_3GPP2_UIM = 0x00000400,
    RIL_CAPS_PERSOFEATURE_ALL = 0x000007FF
} RILPERSOLOCKSUPPORTCAPS;

typedef enum RILCAPSLOCKINGPWDLENGTHPARAMMASK {
    RIL_PARAM_CLPL_FACILITY = 0x00000001,
    RIL_PARAM_CLPL_PASSWORDLENGTH = 0x00000002,
    RIL_PARAM_CLPL_ALL = 0x00000003
} RILCAPSLOCKINGPWDLENGTHPARAMMASK;

typedef struct RILCAPSLOCKINGPWDLENGTH {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwPersoFeature;
    DWORD dwPasswordLength;
} RILCAPSLOCKINGPWDLENGTH, *LPRILCAPSLOCKINGPWDLENGTH;

typedef enum RILUICCLOCKSTATEPARAMMASK {
    RIL_PARAM_UICCLOCKSTATE_UICCLOCK = 0x00000001,
    RIL_PARAM_UICCLOCKSTATE_LOCKSTATE = 0x00000002,
    RIL_PARAM_UICCLOCKSTATE_VERIFYATTEMPTSLEFT = 0x00000004,
    RIL_PARAM_UICCLOCKSTATE_UNBLOCKATTEMPTSLEFT = 0x00000008,
    RIL_PARAM_UICCLOCKSTATE_ALL = 0x0000000F
} RILUICCLOCKSTATEPARAMMASK;

typedef enum RILUICCLOCKSTATELOCKSTATE {
    RIL_UICCLOCKSTATE_NONE = 0x0000000,
    RIL_UICCLOCKSTATE_VERIFIED = 0x0000001,
    RIL_UICCLOCKSTATE_ENABLED = 0x0000002,
    RIL_UICCLOCKSTATE_BLOCKED = 0x0000004,
    RIL_UICCLOCKSTATE_ALL = 0x0000007
} RILUICCLOCKSTATELOCKSTATE;

typedef struct RILUICCLOCKSTATE {
    DWORD cbSize;
    DWORD dwParams;
    RILUICCLOCK rilUiccLock;
    DWORD dwLockState;
    DWORD dwVerifyAttemptsLeft;
    DWORD dwUnblockAttemptsLeft;
} RILUICCLOCKSTATE, *LPRILUICCLOCKSTATE;

typedef enum RILUICCSERVICESERVICE {
    RIL_UICCOPERATION_SERVICE_FDN = 0x01,
    RIL_UICCOPERATION_SERVICE_BDN = 0x02,
    RIL_UICCOPERATION_SERVICE_ACL = 0x03,
    RIL_UICCOPERATION_SERVICE_MAX = RIL_UICCOPERATION_SERVICE_ACL
} RILUICCSERVICESERVICE;

typedef struct RILUICCSERVICE {
    HUICCAPP hUiccApp;
    RILUICCSERVICESERVICE dwService;
} RILUICCSERVICE, *LPRILUICCSERVICE;

typedef struct RILSETUICCLOCKENABLEDPARAMS {
    RILUICCLOCKCREDENTIAL lockCredential;
    BOOL fEnable;
} RILSETUICCLOCKENABLEDPARAMS, *LPRILSETUICCLOCKENABLEDPARAMS;

typedef struct RILUNBLOCKUICCLOCKPARAMS {
    RILUICCLOCKCREDENTIAL lockCredential;
    char szNewPassword[256];
} RILUNBLOCKUICCLOCKPARAMS, *LPRILUNBLOCKUICCLOCKPARAMS;

typedef struct RILCHANGEUICCLOCKPASSWORDPARAMS {
    RILUICCLOCKCREDENTIAL lockCredential;
    char szNewPassword[256];
} RILCHANGEUICCLOCKPASSWORDPARAMS, *LPRILCHANGEUICCLOCKPASSWORDPARAMS;

typedef enum RILUICCAPPPERSOCHECKSTATUSPARAMMASK {
    RIL_PARAM_UAPCS_HUICCAPP = 0x00000001,
    RIL_PARAM_UAPCS_PERSOFEATURE = 0x00000002,
    RIL_PARAM_UAPCS_PERSOCHECKSTATE = 0x00000004,
    RIL_PARAM_UAPCS_ALL = 0x00000007
} RILUICCAPPPERSOCHECKSTATUSPARAMMASK;

typedef enum RILUICCAPPPERSOCHECKSTATUSSTATE {
    RIL_PERSOCHECKSTATE_NOTREADY = 0x01,
    RIL_PERSOCHECKSTATE_PASS = 0x02,
    RIL_PERSOCHECKSTATE_FAIL = 0x03,
    RIL_PERSOCHECKSTATE_MAX = RIL_PERSOCHECKSTATE_FAIL
} RILUICCAPPPERSOCHECKSTATUSSTATE;

typedef struct RILUICCAPPPERSOCHECKSTATUS {
    DWORD cbSize;
    DWORD dwParams;
    HUICCAPP hUiccApp;
    DWORD dwPersoFeature;
    RILUICCAPPPERSOCHECKSTATUSSTATE dwPersoCheckState;
} RILUICCAPPPERSOCHECKSTATUS, *LPRILUICCAPPPERSOCHECKSTATUS;

typedef enum RILPERSODEACTIVATIONSTATEPARAMMASK {
    RIL_PARAM_PDS_STATE = 0x00000001,
    RIL_PARAM_PDS_CK_ATTEMPTS = 0x00000002,
    RIL_PARAM_PDS_PUK_ATTEMPTS = 0x00000004,
    RIL_PARAM_PDS_ALL = 0x00000007
} RILPERSODEACTIVATIONSTATEPARAMMASK;

typedef enum RILPERSODEACTIVATIONSTATEDEPERSOSTATE {
    RIL_DEPERSOSTATE_READY = 0x01,
    RIL_DEPERSOSTATE_CK_REQUIRED = 0x02,
    RIL_DEPERSOSTATE_PUK_REQUIRED = 0x03,
    RIL_DEPERSOSTATE_PUK_BLOCKED = 0x04,
    RIL_DEPERSOSTATE_MAX = RIL_DEPERSOSTATE_PUK_BLOCKED
} RILPERSODEACTIVATIONSTATEDEPERSOSTATE;

typedef struct RILPERSODEACTIVATIONSTATE {
    DWORD cbSize;
    DWORD dwParams;
    RILPERSODEACTIVATIONSTATEDEPERSOSTATE dwDePersoState;
    DWORD dwNumCKAttemptsLeft;
    DWORD dwNumPUKAttemptsLeft;
} RILPERSODEACTIVATIONSTATE, *LPRILPERSODEACTIVATIONSTATE;

typedef struct RILDEACTIVATEPERSOPARAMS {
    DWORD dwPersoFeature;
    char szPassword[256];
} RILDEACTIVATEPERSOPARAMS, *LPRILDEACTIVATEPERSOPARAMS;

typedef enum RILUICCSERVICESTATE {
    RIL_UICCSERVICESTATE_NOTAVAILABLE = 0x00,
    RIL_UICCSERVICESTATE_DISABLED = 0x01,
    RIL_UICCSERVICESTATE_ENABLED = 0x02,
    RIL_UICCSERVICESTATE_MAX = RIL_UICCSERVICESTATE_ENABLED
} RILUICCSERVICESTATE;

typedef struct RILUICCSERVICEINFO {
    DWORD cbSize;
    RILUICCSERVICESERVICE dwService;
    RILUICCSERVICESTATE dwState;
} RILUICCSERVICEINFO, *LPRILUICCSERVICEINFO;

typedef struct RILUICCSERVICEPARAMS {
    RILUICCSERVICE service;
    BOOL fHasLockVerification;
    RILUICCLOCKCREDENTIAL lockCredential;
    BOOL fEnable;
} RILUICCSERVICEPARAMS, *LPRILUICCSERVICEPARAMS;

typedef enum RILPHONEBOOKLOCATIONCAPS {
    RIL_CAPS_PBLOC_UNKOWN = 0x00000000,
    RIL_CAPS_PBLOC_UICCFIXDIALING = 0x00000001,
    RIL_CAPS_PBLOC_OWNNUMBERS = 0x00000002,
    RIL_CAPS_PBLOC_UICCPHONEBOOK = 0x00000004,
    RIL_CAPS_PBLOC_UICCSERVICEDIALING = 0x00000008,
    RIL_CAPS_PBLOC_ALL = 0x0000000F
} RILPHONEBOOKLOCATIONCAPS;

typedef enum RILPHONEENTRYSTORELOCATION {
    RIL_PBLOC_UNKNOWN = RIL_CAPS_PBLOC_UNKOWN,
    RIL_PBLOC_UICCFIXDIALING = RIL_CAPS_PBLOC_UICCFIXDIALING,
    RIL_PBLOC_OWNNUMBERS = RIL_CAPS_PBLOC_OWNNUMBERS,
    RIL_PBLOC_UICCPHONEBOOK = RIL_CAPS_PBLOC_UICCPHONEBOOK,
    RIL_PBLOC_UICCSERVICEDIALING = RIL_CAPS_PBLOC_UICCSERVICEDIALING,
    RIL_PBLOC_ALL = RIL_CAPS_PBLOC_ALL
} RILPHONEENTRYSTORELOCATION;

typedef struct RILREADPHONEBOOKENTRIESPARAMS {
    HUICCAPP hUiccApp;
    RILPHONEENTRYSTORELOCATION dwStoreLocation;
    DWORD dwStartIndex;
    DWORD dwEndIndex;
} RILREADPHONEBOOKENTRIESPARAMS, *LPRILREADPHONEBOOKENTRIESPARAMS;

typedef enum RILPHONEBOOKENTRYPARAMMASK {
    RIL_PARAM_PBE_INDEX = 0x00000001,
    RIL_PARAM_PBE_ADDRESS = 0x00000002,
    RIL_PARAM_PBE_TEXT = 0x00000004,
    RIL_PARAM_PBE_SECONDNAME = 0x00000008,
    RIL_PARAM_PBE_GROUPIDCOUNT = 0x00000010,
    RIL_PARAM_PBE_GROUPID = 0x00000020,
    RIL_PARAM_PBE_ADDITIONALNUMCOUNT = 0x00000040,
    RIL_PARAM_PBE_ADDITIONALNUMSIZE = 0x00000080,
    RIL_PARAM_PBE_ADDITIONALNUMOFFSET = 0x00000100,
    RIL_PARAM_PBE_EMAILCOUNT = 0x00000200,
    RIL_PARAM_PBE_EMAILSIZE = 0x00000400,
    RIL_PARAM_PBE_EMAILOFFSET = 0x00000800,
    RIL_PARAM_PBE_ALL = 0x00000FFF
} RILPHONEBOOKENTRYPARAMMASK;

typedef struct RILPHONEBOOKENTRY {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwIndex;
    RILADDRESS raAddress;
    WCHAR wszText[256];
    WCHAR wszSecondName[256];
    DWORD dwGroupIdCount;
    DWORD rgdwGroupId[10];
    DWORD dwAdditionalNumCount;
    DWORD dwAdditionalNumSize;
    DWORD dwAdditionalNumOffset;
    DWORD dwEmailCount;
    DWORD dwEmailSize;
    DWORD dwEmailOffset;
} RILPHONEBOOKENTRY, *LPRILPHONEBOOKENTRY;

typedef enum RILPHONEBOOKADDITIONALNUMBERPARAMMASK {
    RIL_PARAM_PBAN_ADDRESS = 0x00000001,
    RIL_PARAM_PBAN_NUMID = 0x00000002,
    RIL_PARAM_PBAN_ALL = 0x00000003
} RILPHONEBOOKADDITIONALNUMBERPARAMMASK;

typedef struct RILPHONEBOOKADDITIONALNUMBER {
    DWORD cbSize;
    DWORD dwParams;
    RILADDRESS raAddress;
    DWORD dwNumId;
} RILPHONEBOOKADDITIONALNUMBER, *LPRILPHONEBOOKADDITIONALNUMBER;

typedef enum RILPHONEBOOKMAILADDRESSPARAMMASK {
    RIL_PARAM_PBEA_ADDRESS = 0x00000001,
    RIL_PARAM_PBEA_ALL = 0x00000001
} RILPHONEBOOKMAILADDRESSPARAMMASK;

typedef struct RILPHONEBOOKEMAILADDRESS {
    DWORD cbSize;
    DWORD dwParams;
    WCHAR wszAddress[256];
} RILPHONEBOOKEMAILADDRESS, *LPRILPHONEBOOKEMAILADDRESS;

typedef struct RILWRITEPHONEBOOKENTRYPARAMS {
    HUICCAPP hUiccApp;
    RILPHONEENTRYSTORELOCATION dwStoreLocation;
    BOOL fHasLockVerification;
    RILUICCLOCKCREDENTIAL lockVerification;
    RILPHONEBOOKENTRY pbEntry;
} RILWRITEPHONEBOOKENTRYPARAMS, *LPRILWRITEPHONEBOOKENTRYPARAMS;

typedef struct RILDELETEPHONEBOOKENTRYPARAMS {
    HUICCAPP hUiccApp;
    RILPHONEENTRYSTORELOCATION dwStoreLocation;
    DWORD dwIndex;
    BOOL fHasLockVerification;
    RILUICCLOCKCREDENTIAL lockVerification;
} RILDELETEPHONEBOOKENTRYPARAMS, *LPRILDELETEPHONEBOOKENTRYPARAMS;

typedef struct RILGETPHONEBOOKOPTIONSPARAMS {
    HUICCAPP hUiccApp;
    RILPHONEENTRYSTORELOCATION dwStoreLocation;
} RILGETPHONEBOOKOPTIONSPARAMS, *LPRILGETPHONEBOOKOPTIONSPARAMS;

typedef enum RILPHONEBOOKINFOPARAMMASK {
    RIL_PARAM_PBI_USED = 0x00000001,
    RIL_PARAM_PBI_TOTAL = 0x00000002,
    RIL_PARAM_PBI_ADDRESSLENGTH = 0x00000004,
    RIL_PARAM_PBI_TEXTLENGTH = 0x00000008,
    RIL_PARAM_PBI_MAXANR = 0x00000010,
    RIL_PARAM_PBI_MAXANRLENGTH = 0x00000020,
    RIL_PARAM_PBI_MAXAASTEXTLENGTH = 0x00000040,
    RIL_PARAM_PBI_USEDAAS = 0x00000080,
    RIL_PARAM_PBI_TOTALAAS = 0x00000100,
    RIL_PARAM_PBI_MAXEMAILS = 0x00000200,
    RIL_PARAM_PBI_MAXEMAILLENGTH = 0x00000400,
    RIL_PARAM_PBI_MAXGROUPS = 0x00000800,
    RIL_PARAM_PBI_MAXGASLENGTH = 0x00001000,
    RIL_PARAM_PBI_USEDGAS = 0x00002000,
    RIL_PARAM_PBI_TOTALGAS = 0x00004000,
    RIL_PARAM_PBI_MAXSNELENGTH = 0x00008000,
    RIL_PARAM_PBI_ALL = 0x0000FFFF
} RILPHONEBOOKINFOPARAMMASK;

typedef struct RILPHONEBOOKINFO {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwUsed;
    DWORD dwTotal;
    DWORD dwMaxAddressLength;
    DWORD dwMaxTextLength;
    DWORD dwMaxAdditionalNumbers;
    DWORD dwMaxAdditionalNumberLength;
    DWORD dwMaxAdditionalNumberTextLength;
    DWORD dwUsedAdditionalNumberStrings;
    DWORD dwTotalAdditionalNumberStrings;
    DWORD dwMaxEmails;
    DWORD dwMaxEmailAddressLength;
    DWORD dwMaxGroups;
    DWORD dwMaxGroupStringLength;
    DWORD dwUsedGroupStrings;
    DWORD dwTotalGroupStrings;
    DWORD dwMaxSecondNameStringLength;
} RILPHONEBOOKINFO, *LPRILPHONEBOOKINFO;

typedef struct RILPHONEBOOKADDITIONALNUMBERSTRING {
    DWORD cbSize;
    DWORD dwNumId;
    WCHAR wszText[256];
} RILPHONEBOOKADDITIONALNUMBERSTRING, *LPRILPHONEBOOKADDITIONALNUMBERSTRING;

typedef struct RILWRITEADDITIONALNUMBERSTRINGPARAMS {
    HUICCAPP hUiccApp;
    RILPHONEBOOKADDITIONALNUMBERSTRING RilPBANS;
} RILWRITEADDITIONALNUMBERSTRINGPARAMS, *LPRILWRITEADDITIONALNUMBERSTRINGPARAMS;

typedef struct RILDELETEADDITIONALNUMBERSTRINGPARAMS {
    HUICCAPP hUiccApp;
    DWORD dwNumId;
} RILDELETEADDITIONALNUMBERSTRINGPARAMS, *LPRILDELETEADDITIONALNUMBERSTRINGPARAMS;

typedef struct RILPHONEBOOKADDITIONALNUMBERINFO {
    DWORD cbSize;
    DWORD dwRilPBANSSize;
    RILPHONEBOOKADDITIONALNUMBERSTRING RilPBANS[1];
} RILPHONEBOOKADDITIONALNUMBERINFO, *LPRILPHONEBOOKADDITIONALNUMBERINFO;

typedef enum RILEMERGENCYNUMBERPARAMMASK {
    RIL_PARAM_ENUM_EXECUTOR = 0x00000001,
    RIL_PARAM_ENUM_UICC = 0x00000002,
    RIL_PARAM_ENUM_CATEGORY = 0x00000004,
    RIL_PARAM_ENUM_NUMBER = 0x00000008,
    RIL_PARAM_ENUM_ALL = 0x0000000F
} RILEMERGENCYNUMBERPARAMMASK;

typedef enum RILEMERGENCYNUMBERCATEGORY {
    RIL_ENUM_POLICE = 0x00000001,
    RIL_ENUM_AMBULANCE = 0x00000002,
    RIL_ENUM_FIRE_BRIGADE = 0x00000004,
    RIL_ENUM_MARINE_GUARD = 0x00000008,
    RIL_ENUM_MOUNTAIN_RESCUE = 0x00000010,
    RIL_ENUM_MANUAL_ECALL = 0x00000020,
    RIL_ENUM_AUTO_ECALL = 0x00000040,
    RIL_ENUM_ALL = 0x0000007F
} RILEMERGENCYNUMBERCATEGORY;

typedef struct RILEMERGENCYNUMBER {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    HUICCAPP hUiccApp;
    DWORD dwCategory;
    WCHAR wszEmergencyNumber[8];
} RILEMERGENCYNUMBER, *LPRILEMERGENCYNUMBER;

typedef struct RILEMERGENCYNUMBERSLIST {
    DWORD cbSize;
    DWORD dwRilENSize;
    RILEMERGENCYNUMBER RilEN[1];
} RILEMERGENCYNUMBERSLIST, *LPRILEMERGENCYNUMBERSLIST;

typedef struct RILPHONEBOOKLOCATION {
    DWORD cbSize;
    HUICCAPP hUiccApp;
    RILPHONEENTRYSTORELOCATION dwStoreLocation;
    DWORD dwIndex;
} RILPHONEBOOKLOCATION, *LPRILPHONEBOOKLOCATION;

typedef struct RILPHONEBOOKREADYSTATE {
    DWORD cbSize;
    HUICCAPP hUiccApp;
    DWORD dwStoreLocations;
} RILPHONEBOOKREADYSTATE, *LPRILPHONEBOOKREADYSTATE;

typedef enum RILPHONEBOOKANSOPERATION {
    RIL_PHONEBOOK_ANSADDED = 0x0,
    RIL_PHONEBOOK_ANSMODIFIED = 0x1,
    RIL_PHONEBOOK_ANSDELETED = 0x2,
    RIL_PHONEBOOK_MAX = RIL_PHONEBOOK_ANSDELETED
} RILPHONEBOOKANSOPERATION;

typedef struct RILADDITIONALNUMBERSTRINGUPDATE {
    DWORD cbSize;
    HUICCAPP hUiccApp;
    RILPHONEBOOKANSOPERATION dwOpType;
    DWORD dwNumId;
    WCHAR wszText[256];
} RILADDITIONALNUMBERSTRINGUPDATE, *LPRILADDITIONALNUMBERSTRINGUPDATE;

typedef enum RILRADIOCONFIGURATIONRADIOTYPE {
    RIL_RADIOTYPE_NONE = 0x00,
    RIL_RADIOTYPE_SINGLE = 0x01,
    RIL_RADIOTYPE_MULTIMODE = 0x02,
    RIL_RADIOTYPE_1XCSFB = 0x03,
    RIL_RADIOTYPE_SVLTE = 0x04,
    RIL_RADIOTYPE_DUALSTANDBY = 0x05,
    RIL_RADIOTYPE_DUALACTIVE = 0x06,
    RIL_RADIOTYPE_SGLTE = 0x07,
    RIL_RADIOTYPE_SVLTE_DUALACTIVE = 0x08,
    RIL_RADIOTYPE_SGLTE_DUALACTIVE = 0x09,
    RIL_RADIOTYPE_SRLTE = 0x0a,
    RIL_RADIOTYPE_MAX = RIL_RADIOTYPE_SRLTE
} RILRADIOCONFIGURATIONRADIOTYPE;

typedef struct RILRADIOCONFIGURATION {
    DWORD dwConfigId;
    RILRADIOCONFIGURATIONRADIOTYPE dwRadioType;
    DWORD dwSystemTypes[2];
} RILRADIOCONFIGURATION, *LPRILRADIOCONFIGURATION;

typedef struct RILRADIOCONFIGURATIONS {
    DWORD dwNumberOfConfigurations;
    RILRADIOCONFIGURATION stConfigurations[1];
} RILRADIOCONFIGURATIONS, *LPRILRADIOCONFIGURATIONS;

typedef enum RILEXECUTORFLAG {
    RIL_EXECUTORFLAG_ENABLED = 0x00000001,
    RIL_EXECUTORFLAG_HIGHPRIORITY = 0x00000002,
    RIL_EXECUTORFLAG_ALL = 0x00000003
} RILEXECUTORFLAG;

typedef struct RILEXECUTORCONFIG {
    DWORD cbSize;
    DWORD dwFlags;
    DWORD dwNumApps;
    HUICCAPP lphUiccApps[2];
} RILEXECUTORCONFIG, *LPRILEXECUTORCONFIG;

typedef struct RILSETEXECUTORCONFIGPARAMS {
    DWORD dwExecutor;
    RILEXECUTORCONFIG rilExecutorConfig;
} RILSETEXECUTORCONFIGPARAMS, *LPRILSETEXECUTORCONFIGPARAMS;

typedef enum RILSYSTEMSELECTIONPREFSMODE {
    RIL_OPSELMODE_AUTOMATIC = 0x01,
    RIL_OPSELMODE_MANUAL = 0x02,
    RIL_OPSELMODE_MAX = RIL_OPSELMODE_MANUAL
} RILSYSTEMSELECTIONPREFSMODE;

typedef enum RILSYSTEMSELECTIONPREFSROAMINGMODE {
    RIL_ROAMMODE_HOMEONLY = 0x01,
    RIL_ROAMMODE_AUTOMATIC = 0x02,
    RIL_ROAMMODE_DOMESTIC = 0x03,
    RIL_ROAMMODE_MAX = RIL_ROAMMODE_DOMESTIC
} RILSYSTEMSELECTIONPREFSROAMINGMODE;

typedef enum RILSYSTEMSELECTIONPREFSPARAMMASK {
    RIL_PARAM_SSP_EXECUTOR = 0x00000001,
    RIL_PARAM_SSP_SYSTEMTYPES = 0x00000002,
    RIL_PARAM_SSP_MODE = 0x00000004,
    RIL_PARAM_SSP_PLMNINFO = 0x00000008,
    RIL_PARAM_SSP_ROAMINGMODE = 0x00000010,
    RIL_PARAM_SSP_ACQUISITIONORDERSIZE = 0x00000020,
    RIL_PARAM_SSP_ACQUISITIONORDER = 0x00000040,
    RIL_PARAM_SSP_ALL = 0x0000007F
} RILSYSTEMSELECTIONPREFSPARAMMASK;

typedef struct RILSYSTEMSELECTIONPREFS_V1 {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    DWORD dwSystemTypes;
    RILSYSTEMSELECTIONPREFSMODE dwMode;
    RILOPERATORNAMES plmnInfo;
    RILSYSTEMSELECTIONPREFSROAMINGMODE dwRoamingMode;
} RILSYSTEMSELECTIONPREFS_V1, *LPRILSYSTEMSELECTIONPREFS_V1;

typedef struct RILSYSTEMSELECTIONPREFS_V2 {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    DWORD dwSystemTypes;
    RILSYSTEMSELECTIONPREFSMODE dwMode;
    RILOPERATORNAMES plmnInfo;
    RILSYSTEMSELECTIONPREFSROAMINGMODE dwRoamingMode;
    DWORD dwAcquisitionOrderSize;
    DWORD AcquisitionOrder[16];
} RILSYSTEMSELECTIONPREFS_V2, *LPRILSYSTEMSELECTIONPREFS_V2, RILSYSTEMSELECTIONPREFS, *LPRILSYSTEMSELECTIONPREFS;

typedef enum RILSETSYSTEMSELECTIONPREFSFLAG {
    RIL_SSSPFLAG_NONE = 0x00000000,
    RIL_SSSPFLAG_APPLYIMMEDIATELY = 0x00000001,
    RIL_SSSPFLAG_ENFORCESCAN = 0x00000002,
    RIL_SSSPFLAG_ALL = 0x00000003
} RILSETSYSTEMSELECTIONPREFSFLAG;

typedef struct RILSETSYSTEMSELECTIONPREFSPARAMS_V1 {
    DWORD dwFlags;
    RILSYSTEMSELECTIONPREFS_V1 rilSystemSelectionPrefs;
} RILSETSYSTEMSELECTIONPREFSPARAMS_V1, *LPRILSETSYSTEMSELECTIONPREFSPARAMS_V1;

typedef struct RILSETSYSTEMSELECTIONPREFSPARAMS_V2 {
    DWORD dwFlags;
    RILSYSTEMSELECTIONPREFS rilSystemSelectionPrefs;
} RILSETSYSTEMSELECTIONPREFSPARAMS_V2, *LPRILSETSYSTEMSELECTIONPREFSPARAMS_V2, RILSETSYSTEMSELECTIONPREFSPARAMS, *LPRILSETSYSTEMSELECTIONPREFSPARAMS;

typedef struct RILGETOPERATORLISTPARAMS {
    DWORD dwExecutor;
    DWORD dwSystemTypes;
} RILGETOPERATORLISTPARAMS, *LPRILGETOPERATORLISTPARAMS;

typedef enum RILOPERATORINFOPARAMMASK {
    RIL_PARAM_OI_INDEX = 0x00000001,
    RIL_PARAM_OI_STATUS = 0x00000002,
    RIL_PARAM_OI_NAMES = 0x00000004,
    RIL_PARAM_OI_ALL = 0x00000007
} RILOPERATORINFOPARAMMASK;

typedef enum RILOPERATORINFOSTATUS {
    RIL_OPSTATUS_UNKNOWN = 0x01,
    RIL_OPSTATUS_AVAILABLE = 0x02,
    RIL_OPSTATUS_CURRENT = 0x03,
    RIL_OPSTATUS_FORBIDDEN = 0x04,
    RIL_OPSTATUS_MAX = RIL_OPSTATUS_FORBIDDEN
} RILOPERATORINFOSTATUS;

typedef struct RILOPERATORINFO {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwIndex;
    RILOPERATORINFOSTATUS dwStatus;
    RILOPERATORNAMES ronNames;
} RILOPERATORINFO, *LPRILOPERATORINFO;

typedef enum RILGETPREFERENCEDOPERATORLISTFORMAT {
    RIL_OPFORMAT_LONG = 0x01,
    RIL_OPFORMAT_SHORT = 0x02,
    RIL_OPFORMAT_NUM = 0x03,
    RIL_OPFORMAT_MAX = RIL_OPFORMAT_NUM
} RILGETPREFERENCEDOPERATORLISTFORMAT;

typedef struct RILGETPREFERREDOPERATORLISTPARAMS {
    HUICCAPP hUiccApp;
    RILGETPREFERENCEDOPERATORLISTFORMAT dwFormat;
} RILGETPREFERREDOPERATORLISTPARAMS, *LPRILGETPREFERREDOPERATORLISTPARAMS;

typedef enum RILREGSTATUSINFOPARAMMASK {
    RIL_PARAM_REGSI_EXECUTOR = 0x00000001,
    RIL_PARAM_REGSI_HUICCAPP = 0x00000002,
    RIL_PARAM_REGSI_REGSTATUS = 0x00000004,
    RIL_PARAM_REGSI_ACCESSTECHNOLOGY = 0x00000008,
    RIL_PARAM_REGSI_SYSTEMCAPS = 0x00000010,
    RIL_PARAM_REGSI_REGREJECTREASON = 0x00000020,
    RIL_PARAM_REGSI_CURRENTOPERATOR = 0x00000040,
    RIL_PARAM_REGSI_VOICEDOMAIN = 0x00000080,
    RIL_PARAM_REGSI_NETWORKCODE = 0x00000100,
    RIL_PARAM_REGSI_ALL = 0x000001FF
} RILREGSTATUSINFOPARAMMASK;

typedef enum RILSYSTEMCAPS {
    RIL_SYSTEMCAPS_NONE = 0x00000000,
    RIL_SYSTEMCAPS_VOICEDATA = 0x00000001,
    RIL_SYSTEMCAPS_ALL = 0x00000001
} RILSYSTEMCAPS;

typedef enum RILVOICEDOMAIN {
    RIL_VOICE_DOMAIN_NONE = 0x00000000,
    RIL_VOICE_DOMAIN_3GPP = 0x00000001,
    RIL_VOICE_DOMAIN_3GPP2 = 0x00000002,
    RIL_VOICE_DOMAIN_IMS = 0x00000003,
    RIL_VOICE_DOMAIN_MAX = RIL_VOICE_DOMAIN_IMS
} RILVOICEDOMAIN;

typedef struct RILNETWORKCODE {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    DWORD dwMCC;
    DWORD dwMNC;
    DWORD dwSID;
    DWORD dwNID;
    DWORD dwRI;
} RILNETWORKCODE, *LPRILNETWORKCODE;

typedef struct RILREGSTATUSINFO {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    HUICCAPP hUiccApp;
    RILREGSTAT dwRegStatus;
    RILACCESSTECHNOLOGY ratAccessTechnology;
    DWORD dwSystemCaps;
    DWORD dwRegRejectReason;
    RILOPERATORNAMES ronCurrentOperator;
    RILVOICEDOMAIN dwVoiceDomain;
    RILNETWORKCODE rncNetworkCode;
} RILREGSTATUSINFO, *LPRILREGSTATUSINFO;

typedef enum RILRILREGSTATUSINFOREJECTREASON {
    RIL_REGREJECTREASON_NULL = 0x00,
    RIL_REGREJECTREASON_IMSIUNK_HLR = 0x02,
    RIL_REGREJECTREASON_ILLEGAL_MS = 0x03,
    RIL_REGREJECTREASON_IMSIUNK_VLR = 0x04,
    RIL_REGREJECTREASON_IMSI_NOTACCEPTED = 0x05,
    RIL_REGREJECTREASON_ILLEGAL_ME = 0x06,
    RIL_REGREJECTREASON_PLMN_NOTALLOWED = 0x0B,
    RIL_REGREJECTREASON_LOCAREA_NOTALLOWED = 0x0C,
    RIL_REGREJECTREASON_ROAMING_NOTALLOWED = 0x0D,
    RIL_REGREJECTREASON_NOSUITABLECELL = 0x0F,
    RIL_REGREJECTREASON_NETWORKFAILURE = 0x11,
    RIL_REGREJECTREASON_MACFAILURE = 0x14,
    RIL_REGREJECTREASON_SYNCHFAILURE = 0x15,
    RIL_REGREJECTREASON_CONGESTION = 0x16,
    RIL_REGREJECTREASON_GSMAUTH_NOTACCEPTED = 0x17,
    RIL_REGREJECTREASON_CSG_NOTAUTHORIZED = 0x19,
    RIL_REGREJECTREASON_SVCOPT_NOTSUPPORTED = 0x20,
    RIL_REGREJECTREASON_REQSVCOPT_NOTSUBSCRIBED = 0x21,
    RIL_REGREJECTREASON_SVCOPT_OUTOFORDER = 0x22
} RILRILREGSTATUSINFOREJECTREASON;

typedef struct RILSETPREFERREDOPERATORLISTPARAMS {
    HUICCAPP hUiccApp;
    DWORD dwPreferredListSize;
    RILOPERATORNAMES PreferredList[1];
} RILSETPREFERREDOPERATORLISTPARAMS, *LPRILSETPREFERREDOPERATORLISTPARAMS;

typedef struct RILSETEXECUTORRFSTATEPARAMS {
    DWORD dwExecutor;
    BOOL fExecutorRFState;
} RILSETEXECUTORRFSTATEPARAMS, *LPRILSETEXECUTORRFSTATEPARAMS;

typedef enum RILEXECUTORRFSTATEPARAMMASK {
    RIL_PARAM_GERFS_EXECUTOR = 0x00000001,
    RIL_PARAM_GERFS_STATE = 0x00000002,
    RIL_PARAM_GERFS_ALL = 0x00000003
} RILEXECUTORRFSTATEPARAMMASK;

typedef enum RILPSMEDIAPREFERENCE {
    RIL_PSMPREF_UNKNOWN = 0x00000000,
    RIL_PSMPREF_WIFIONLY = 0x00000001,
    RIL_PSMPREF_WIFIPREFERRED = 0x00000002,
    RIL_PSMPREF_CELLONLY = 0x00000003,
    RIL_PSMPREF_CELLPREFERRED = 0x00000004,
    RIL_PSMPREF_NUMBER_OF_VALUES = RIL_PSMPREF_CELLPREFERRED
} RILPSMEDIAPREFERENCE;

typedef struct RILPSMEDIACONFIGURATION {
    RILPSMEDIAPREFERENCE dwMediaPreference;
    DWORD dwServiceType;
} RILPSMEDIACONFIGURATION, *LPRILPSMEDIACONFIGURATION;

typedef struct RILPSMEDIACONFIGURATIONSET {
    DWORD cbSize;
    DWORD dwExecutor;
    DWORD dwNumMediaConfiguration;
    RILPSMEDIACONFIGURATION stMediaConfiguration[1];
} RILPSMEDIACONFIGURATIONSET, *LPRILPSMEDIACONFIGURATIONSET;

typedef struct RILEXECUTORRFSTATE {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    BOOL fExecutorRFState;
} RILEXECUTORRFSTATE, *LPRILEXECUTORRFSTATE;

typedef enum RILLOCATIONINFOPARAMMASK {
    RIL_PARAM_LU_EXECUTOR = 0x00000001,
    RIL_PARAM_LU_HUICCAPP = 0x00000002,
    RIL_PARAM_LU_LAC = 0x00000004,
    RIL_PARAM_LU_TAC = 0x00000008,
    RIL_PARAM_LU_CELLID = 0x00000010,
    RIL_PARAM_LU_ALL = 0x0000001F
} RILLOCATIONINFOPARAMMASK;

typedef struct RILLOCATIONINFO {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    DWORD hUiccApp;
    DWORD dwLocationAreaCode;
    DWORD dwTrackingAreaCode;
    DWORD dwCellID;
} RILLOCATIONINFO, *LPRILLOCATIONINFO;

typedef enum RILNETWORKCODEPARAMMASK {
    RIL_PARAM_NETWORKCODE_EXECUTOR = 0x00000001,
    RIL_PARAM_NETWORKCODE_MCC = 0x00000002,
    RIL_PARAM_NETWORKCODE_MNC = 0x00000004,
    RIL_PARAM_NETWORKCODE_SID = 0x00000008,
    RIL_PARAM_NETWORKCODE_NID = 0x00000010,
    RIL_PARAM_NETWORKCODE_RI = 0x00000020,
    RIL_PARAM_NETWORKCODE_ALL = 0x0000003F
} RILNETWORKCODEPARAMMASK;

typedef enum RILPROVISIONSTATUSPROVISIONSTATUS {
    RIL_PROVISIONSTAT_STARTED = 0x01,
    RIL_PROVISIONSTAT_SUCCESS = 0x02,
    RIL_PROVISIONSTAT_FAILURE_END = 0x03,
    RIL_PROVISIONSTAT_FAILURE_RETRY = 0x04,
    RIL_PROVISIONSTAT_NEEDED = 0x05,
    RIL_PROVISIONSTAT_BIP_STARTED = 0x06,
    RIL_PROVISIONSTAT_BIP_SUCCESS = 0x07,
    RIL_PROVISIONSTAT_MAX = RIL_PROVISIONSTAT_BIP_SUCCESS
} RILPROVISIONSTATUSPROVISIONSTATUS;

typedef struct RILPROVISIONSTATUS {
    DWORD cbSize;
    DWORD dwExecutor;
    RILPROVISIONSTATUSPROVISIONSTATUS dwProvisionStatus;
} RILPROVISIONSTATUS, *LPRILPROVISIONSTATUS;

typedef struct RILEXECUTORSTATE {
    DWORD cbSize;
    DWORD dwExecutor;
    DWORD dwFlags;
} RILEXECUTORSTATE, *LPRILEXECUTORSTATE;

typedef enum RILSIGNALQUALITYPARAMMASK {
    RIL_PARAM_SQ_EXECUTOR = 0x00000001,
    RIL_PARAM_SQ_SYSTEMTYPE = 0x00000002,
    RIL_PARAM_SQ_NUMSIGNALBARS = 0x00000004,
    RIL_PARAM_SQ_SIGNALSTRENGTH = 0x00000008,
    RIL_PARAM_SQ_SNR = 0x00000010,
    RIL_PARAM_SQ_ALL = 0x0000001F
} RILSIGNALQUALITYPARAMMASK;

typedef struct RILSIGNALQUALITY {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    DWORD dwSystemType;
    int nNumSignalBars;
    int nSignalStrength;
    int nSNRStrength;
} RILSIGNALQUALITY, *LPRILSIGNALQUALITY;

typedef enum RILSIGNALQUALITYCAPS {
    RIL_CAPS_SIGNALQUALITY_NOTIFICATION = 0x00000001,
    RIL_CAPS_SIGNALQUALITY_POLLING = 0x00000002,
    RIL_CAPS_SIGNALQUALITY_MAX = RIL_CAPS_SIGNALQUALITY_POLLING
} RILSIGNALQUALITYCAPS;

typedef enum RILNITZNOTIFICATIONCAPS {
    RIL_CAPS_NITZ_DISABLED = 0x01,
    RIL_CAPS_NITZ_ENABLED = 0x02,
    RIL_CAPS_NITZ_MAX = RIL_CAPS_NITZ_ENABLED
} RILNITZNOTIFICATIONCAPS;

typedef enum RILNITZINFOPARAMMASK {
    RIL_PARAM_NITZ_EXECUTOR = 0x00000001,
    RIL_PARAM_NITZ_TIMEZONEOFFSET = 0x00000002,
    RIL_PARAM_NITZ_DAYLIGHTSAVINGOFFSET = 0x00000004,
    RIL_PARAM_NITZ_SYSTEMTIME = 0x00000008,
    RIL_PARAM_NITZ_SYSTEMTYPE = 0x00000010,
    RIL_PARAM_NITZ_ALL = 0x0000001F
} RILNITZINFOPARAMMASK;

typedef struct RILNITZINFO_V1 {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    int TimeZoneOffsetMinutes;
    int DaylightSavingOffsetMinutes;
    RILSYSTEMTIME SysTime;
} RILNITZINFO_V1, *LPRILNITZINFO_V1;

typedef struct RILNITZINFO_V2 {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    int TimeZoneOffsetMinutes;
    int DaylightSavingOffsetMinutes;
    RILSYSTEMTIME SysTime;
    DWORD dwSystemTypes;
} RILNITZINFO_V2, *LPRILNITZINFO_V2, RILNITZINFO, *LPRILNITZINFO;

typedef struct RILUICCTOOLKITPROFILE {
    DWORD cbSize;
    DWORD dwProfileSize;
    BYTE bProfile[1];
} RILUICCTOOLKITPROFILE, *LPRILUICCTOOLKITPROFILE;

typedef struct RILSENDUICCTOOLKITCMDRESPONSEPARAMS {
    DWORD dwSlotIndex;
    DWORD dwDetailsSize;
    BYTE bDetails[1];
} RILSENDUICCTOOLKITCMDRESPONSEPARAMS, *LPRILSENDUICCTOOLKITCMDRESPONSEPARAMS;

typedef struct RILSENDUICCTOOLKITENVELOPEPARAMS {
    DWORD dwSlotIndex;
    DWORD dwEnvelopeSize;
    BYTE bEnvelope[1];
} RILSENDUICCTOOLKITENVELOPEPARAMS, *LPRILSENDUICCTOOLKITENVELOPEPARAMS;

typedef struct RILUICCTOOLKITCMD {
    DWORD cbSize;
    DWORD dwSlotIndex;
    BOOL fTerminalResponseNeeded;
    DWORD dwDetailsSize;
    BYTE bDetails[1];
} RILUICCTOOLKITCMD, *LPRILUICCTOOLKITCMD;

typedef enum RILCALLSUPPORTCAPS {
    RIL_CAPS_CALLSUPPORT_CCBS = 0x00000001,
    RIL_CAPS_CALLSUPPORT_CD = 0x00000002,
    RIL_CAPS_CALLSUPPORT_CNAP = 0x00000004,
    RIL_CAPS_CALLSUPPORT_CUG = 0x00000008,
    RIL_CAPS_CALLSUPPORT_EMLPP = 0x00000010,
    RIL_CAPS_CALLSUPPORT_FM = 0x00000020,
    RIL_CAPS_CALLSUPPORT_MSP = 0x00000040,
    RIL_CAPS_CALLSUPPORT_USSD_PHASE2 = 0x00000080,
    RIL_CAPS_CALLSUPPORT_USS = 0x00000100,
    RIL_CAPS_CALLSUPPORT_ALL = 0x000001FF
} RILCALLSUPPORTCAPS;

typedef enum RILDIALPARAMSOPTIONS {
    RIL_DIALOPT_NONE = 0x00000000,
    RIL_DIALOPT_RESTRICTID = 0x00000001,
    RIL_DIALOPT_PRESENTID = 0x00000002,
    RIL_DIALOPT_ANYEXECUTORFOREMERGENCY = 0x00000004,
    RIL_DIALOPT_ALL = 0x00000007
} RILDIALPARAMSOPTIONS;

typedef struct RILDIALPARAMS_V1 {
    DWORD dwExecutor;
    RILADDRESS raAddress;
    DWORD dwOptions;
} RILDIALPARAMS_V1, *LPRILDIALPARAMS_V1;

typedef struct RILDIALPARAMS_V2 {
    DWORD dwExecutor;
    RILADDRESS raAddress;
    DWORD dwOptions;
    RILCALLTYPE dwType;
    BOOL fHasMediaOffer;
    RILCALLMEDIAOFFERANSWERSET rcmMediaOffer;
} RILDIALPARAMS_V2, *LPRILDIALPARAMS_V2, RILDIALPARAMS, *LPRILDIALPARAMS;

typedef enum RILMANAGECALLPARAMSCOMMAND {
    RIL_CALLCMD_RELEASEACTIVE_ACCEPTHELD = 0x02,
    RIL_CALLCMD_RELEASECALL = 0x03,
    RIL_CALLCMD_HOLDACTIVE_ACCEPTHELD = 0x04,
    RIL_CALLCMD_HOLDALLBUTONE = 0x05,
    RIL_CALLCMD_ADDHELDTOCONF = 0x06,
    RIL_CALLCMD_ADDHELDTOCONF_DISCONNECT = 0x07,
    RIL_CALLCMD_RELEASEPROCEEDING = 0x0A,
    RIL_CALLCMD_RELEASEALLCALLS = 0x0B,
    RIL_CALLCMD_RELEASEHELDCONFCALL = 0x0C,
    RIL_CALLCMD_ACCEPTINCOMINGCALL = 0x0D,
    RIL_CALLCMD_OFFERMEDIA = 0x0E,
    RIL_CALLCMD_ANSWERMEDIAOFFER = 0x0F,
    RIL_CALLCMD_MAX = RIL_CALLCMD_ANSWERMEDIAOFFER
} RILMANAGECALLPARAMSCOMMAND;

typedef struct RILMANAGECALLSPARAMS_V1 {
    DWORD dwExecutor;
    RILMANAGECALLPARAMSCOMMAND dwCommand;
    DWORD dwID;
} RILMANAGECALLSPARAMS_V1, *LPRILMANAGECALLSPARAMS_V1;

typedef struct RILMANAGECALLSPARAMS_V2 {
    DWORD dwExecutor;
    RILMANAGECALLPARAMSCOMMAND dwCommand;
    DWORD dwID;
    BOOL fHasOfferAnswer;
    RILCALLMEDIAOFFERANSWERSET rcmOfferAnswer;
} RILMANAGECALLSPARAMS_V2, *LPRILMANAGECALLSPARAMS_V2, RILMANAGECALLSPARAMS, *LPRILMANAGECALLSPARAMS;

typedef enum RILEMERGENCYMODECONTROLPARAMSCONTROL {
    RIL_EMC_EXIT_CDMA_ECBM = 0x01,
    RIL_EMC_OTHER_MODEM_IN_EMERGECY_MODE = 0x02,
    RIL_EMC_ALL_MODEMS_ARE_IN_NORMAL_MODE = 0x03,
    RIL_EMC_MAX = RIL_EMC_ALL_MODEMS_ARE_IN_NORMAL_MODE
} RILEMERGENCYMODECONTROLPARAMSCONTROL;

typedef struct RILEMERGENCYMODECONTROLPARAMS {
    DWORD dwExecutor;
    RILEMERGENCYMODECONTROLPARAMSCONTROL dwEmergencyModeControl;
} RILEMERGENCYMODECONTROLPARAMS, *LPRILEMERGENCYMODECONTROLPARAMS;

typedef enum RILCALLFORWARDINGSETTINGSREASON {
    RIL_FWDREASON_UNCONDITIONAL = 0x01,
    RIL_FWDREASON_MOBILEBUSY = 0x02,
    RIL_FWDREASON_NOREPLY = 0x03,
    RIL_FWDREASON_UNREACHABLE = 0x04,
    RIL_FWDREASON_ALLFORWARDING = 0x05,
    RIL_FWDREASON_ALLCONDITIONAL = 0x06,
    RIL_FWDREASON_MAX = RIL_FWDREASON_ALLCONDITIONAL
} RILCALLFORWARDINGSETTINGSREASON;

typedef struct RILGETCALLFORWARDINGPARAMS {
    DWORD dwExecutor;
    RILCALLFORWARDINGSETTINGSREASON dwReason;
    BOOL fAllClasses;
    DWORD dwInfoClasses;
} RILGETCALLFORWARDINGPARAMS, *LPRILGETCALLFORWARDINGPARAMS;

typedef enum RILCALLFORWARDINGSETTINGSPARAMMASK {
    RIL_PARAM_CFS_STATUS = 0x00000001,
    RIL_PARAM_CFS_INFOCLASSES = 0x00000002,
    RIL_PARAM_CFS_ADDRESS = 0x00000004,
    RIL_PARAM_CFS_SUBADDRESS = 0x00000008,
    RIL_PARAM_CFS_DELAYTIME = 0x00000010,
    RIL_PARAM_CFS_ALL = 0x0000001F
} RILCALLFORWARDINGSETTINGSPARAMMASK;

typedef enum RILSERVICESETTINGSSTATUS {
    RIL_SVCSTAT_UNKNOWN = 0x01,
    RIL_SVCSTAT_DISABLED = 0x02,
    RIL_SVCSTAT_ENABLED = 0x03,
    RIL_SVCSTAT_DEFAULT = 0x04,
    RIL_SVCSTAT_MAX = RIL_SVCSTAT_DEFAULT
} RILSERVICESETTINGSSTATUS;

typedef struct RILCALLFORWARDINGSETTINGS {
    DWORD cbSize;
    DWORD dwParams;
    RILSERVICESETTINGSSTATUS dwStatus;
    DWORD dwInfoClasses;
    RILADDRESS raAddress;
    RILSUBADDRESS rsaSubAddress;
    DWORD dwDelayTime;
} RILCALLFORWARDINGSETTINGS, *LPRILCALLFORWARDINGSETTINGS;

typedef struct RILSETCALLFORWARDINGSTATUSPARAMS {
    DWORD dwExecutor;
    RILCALLFORWARDINGSETTINGSREASON dwReason;
    BOOL fAllClasses;
    DWORD dwInfoClasses;
    RILSERVICESETTINGSSTATUS dwStatus;
} RILSETCALLFORWARDINGSTATUSPARAMS, *LPRILSETCALLFORWARDINGSTATUSPARAMS;

typedef struct RILADDCALLFORWARDINGPARAMS {
    DWORD dwExecutor;
    RILCALLFORWARDINGSETTINGSREASON dwReason;
    RILCALLFORWARDINGSETTINGS rcfsSettings;
} RILADDCALLFORWARDINGPARAMS, *LPRILADDCALLFORWARDINGPARAMS;

typedef struct RILREMOVECALLFORWARDINGPARAMS {
    DWORD dwExecutor;
    RILCALLFORWARDINGSETTINGSREASON dwReason;
    DWORD dwInfoClasses;
} RILREMOVECALLFORWARDINGPARAMS, *LPRILREMOVECALLFORWARDINGPARAMS;

typedef enum RILCALLBARRINGSTATUSPARAMSTYPE {
    RIL_BARRTYPE_ALLOUTGOING = 0x01,
    RIL_BARRTYPE_OUTGOINGINT = 0x02,
    RIL_BARRTYPE_OUTGOINGINTEXTOHOME = 0x03,
    RIL_BARRTYPE_ALLINCOMING = 0x04,
    RIL_BARRTYPE_INCOMINGROAMING = 0x05,
    RIL_BARRTYPE_INCOMINGNOTINUICC = 0x06,
    RIL_BARRTYPE_ALLBARRING = 0x07,
    RIL_BARRTYPE_ALLOUTGOINGBARRING = 0x08,
    RIL_BARRTYPE_ALLINCOMINGBARRING = 0x09,
    RIL_BARRTYPE_ALL = RIL_BARRTYPE_ALLINCOMINGBARRING
} RILCALLBARRINGSTATUSPARAMSTYPE;

typedef struct RILGETCALLBARRINGSTATUSPARAMS {
    DWORD dwExecutor;
    RILCALLBARRINGSTATUSPARAMSTYPE dwType;
    BOOL fAllClasses;
    DWORD dwInfoClasses;
} RILGETCALLBARRINGSTATUSPARAMS, *LPRILGETCALLBARRINGSTATUSPARAMS;

typedef enum RILCALLBARRINGSTATUSPARAMSSTATUS {
    RIL_BARRINGSTATUS_DISABLED = 0x01,
    RIL_BARRINGSTATUS_ENABLED = 0x02,
    RIL_BARRINGSTATUS_MAX = RIL_BARRINGSTATUS_ENABLED
} RILCALLBARRINGSTATUSPARAMSSTATUS;

typedef struct RILSETCALLBARRINGSTATUSPARAMS {
    DWORD dwExecutor;
    RILCALLBARRINGSTATUSPARAMSTYPE dwType;
    BOOL fAllClasses;
    DWORD dwInfoClasses;
    BOOL fPassword;
    char szPassword[256];
    RILCALLBARRINGSTATUSPARAMSSTATUS dwStatus;
} RILSETCALLBARRINGSTATUSPARAMS, *LPRILSETCALLBARRINGSTATUSPARAMS;

typedef struct RILCHANGECALLBARRINGPASSWORDPARAMS {
    DWORD dwExecutor;
    RILCALLBARRINGSTATUSPARAMSTYPE dwType;
    char szOldPassword[256];
    char szNewPassword[256];
    char szConfirmPassword[256];
} RILCHANGECALLBARRINGPASSWORDPARAMS, *LPRILCHANGECALLBARRINGPASSWORDPARAMS;

typedef struct RILGETCALLWAITINGSETTINGSPARAMS {
    DWORD dwExecutor;
    BOOL fAllClasses;
    DWORD dwInfoClasses;
} RILGETCALLWAITINGSETTINGSPARAMS, *LPRILGETCALLWAITINGSETTINGSPARAMS;

typedef struct RILSETCALLWAITINGSTATUSPARAMS {
    DWORD dwExecutor;
    BOOL fAllClasses;
    DWORD dwInfoClasses;
    RILSERVICESETTINGSSTATUS dwStatus;
} RILSETCALLWAITINGSTATUSPARAMS, *LPRILSETCALLWAITINGSTATUSPARAMS;

typedef enum RILCALLERIDSETTINGSPARAMMASK {
    RIL_PARAM_CIDS_EXECUTOR = 0x00000001,
    RIL_PARAM_CIDS_PROVISIONING = 0x00000002,
    RIL_PARAM_CIDS_STATUS = 0x00000004,
    RIL_PARAM_CIDS_ALL = 0x00000007
} RILCALLERIDSETTINGSPARAMMASK;

typedef enum RILSERVICEPROVISIONINGSTATUS {
    RIL_SVCPROV_UNKNOWN = 0x01,
    RIL_SVCPROV_NOTPROVISIONED = 0x02,
    RIL_SVCPROV_PROVISIONED = 0x03,
    RIL_SVCPROV_TEMPMODERESTRICTED = 0x04,
    RIL_SVCPROV_TEMPMODEALLOWED = 0x05,
    RIL_SVCPROV_MAX = RIL_SVCPROV_TEMPMODEALLOWED
} RILSERVICEPROVISIONINGSTATUS;

typedef struct RILCALLERIDSETTINGS {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    RILSERVICESETTINGSSTATUS dwStatus;
    RILSERVICEPROVISIONINGSTATUS dwProvisioning;
} RILCALLERIDSETTINGS, *LPRILCALLERIDSETTINGS;

typedef enum RILDIALEDIDSETTINGSPARAMMASK {
    RIL_PARAM_DIDS_EXECUTOR = 0x00000001,
    RIL_PARAM_DIDS_PROVISIONING = 0x00000002,
    RIL_PARAM_DIDS_STATUS = 0x00000004,
    RIL_PARAM_DIDS_ALL = 0x00000007
} RILDIALEDIDSETTINGSPARAMMASK;

typedef struct RILDIALEDIDSETTINGS {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    RILSERVICESETTINGSSTATUS dwStatus;
    RILSERVICEPROVISIONINGSTATUS dwProvisioning;
} RILDIALEDIDSETTINGS, *LPRILDIALEDIDSETTINGS;

typedef enum RILHIDECONNECTEDIDSETTINGSPARAMMASK {
    RIL_PARAM_HCIDS_EXECUTOR = 0x00000001,
    RIL_PARAM_HCIDS_STATUS = 0x00000002,
    RIL_PARAM_HCIDS_PROVISIONING = 0x00000004,
    RIL_PARAM_HCIDS_ALL = 0x00000007
} RILHIDECONNECTEDIDSETTINGSPARAMMASK;

typedef struct RILHIDECONNECTEDIDSETTINGS {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    RILSERVICESETTINGSSTATUS dwStatus;
    RILSERVICEPROVISIONINGSTATUS dwProvisioning;
} RILHIDECONNECTEDIDSETTINGS, *LPRILHIDECONNECTEDIDSETTINGS;

typedef enum RILHIDEIDSETTINGSPARAMMASK {
    RIL_PARAM_HIDS_EXECUTOR = 0x00000001,
    RIL_PARAM_HIDS_STATUS = 0x00000002,
    RIL_PARAM_HIDS_PROVISIONING = 0x00000004,
    RIL_PARAM_HIDS_ALL = 0x00000007
} RILHIDEIDSETTINGSPARAMMASK;

typedef struct RILHIDEIDSETTINGS {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    RILSERVICESETTINGSSTATUS dwStatus;
    RILSERVICEPROVISIONINGSTATUS dwProvisioning;
} RILHIDEIDSETTINGS, *LPRILHIDEIDSETTINGS;

typedef struct RILSENDFLASHPARAMS {
    DWORD dwExecutor;
    RILADDRESS raAddress;
} RILSENDFLASHPARAMS, *LPRILSENDFLASHPARAMS;

typedef struct RILSENDSUPSERVICEDATAPARAMS {
    DWORD dwExecutor;
    DWORD dwDataSize;
    WCHAR wszData[1];
} RILSENDSUPSERVICEDATAPARAMS, *LPRILSENDSUPSERVICEDATAPARAMS;

typedef struct RILSENDSUPSERVICEDATARESPONSEPARAMS {
    DWORD dwExecutor;
    DWORD dwDataSize;
    WCHAR wszData[1];
} RILSENDSUPSERVICEDATARESPONSEPARAMS, *LPRILSENDSUPSERVICEDATARESPONSEPARAMS;

typedef struct RILSETEXECUTORFOCUSPARAMS {
    DWORD dwNumberOfExecutors;
    BOOL fFocusStates[2];
} RILSETEXECUTORFOCUSPARAMS, *LPRILSETEXECUTORFOCUSPARAMS;

typedef enum RILALPHAIDENTIFIERPARAMMASK {
    RIL_PARAM_AI_TYPE = 0x00000001,
    RIL_PARAM_AI_REASON = 0x00000002,
    RIL_PARAM_AI_ALL = 0x00000003
} RILALPHAIDENTIFIERPARAMMASK;

typedef enum RILALPHAIDENTIFIDERTYPE {
    RIL_ALPHAIDENTIFIERTYPE_UNKNOWN = 0x01,
    RIL_ALPHAIDENTIFIERTYPE_PRESENT = 0x02,
    RIL_ALPHAIDENTIFIERTYPE_NOTPRESENT = 0x03,
    RIL_ALPHAIDENTIFIERTYPE_MAX = RIL_ALPHAIDENTIFIERTYPE_NOTPRESENT
} RILALPHAIDENTIFIDERTYPE;

typedef struct RILALPHAIDENTIFIER {
    DWORD cbSize;
    DWORD dwParams;
    RILALPHAIDENTIFIDERTYPE dwType;
    WCHAR wszReason[256];
} RILALPHAIDENTIFIER, *LPRILALPHAIDENTIFIER;

typedef enum RILCALLMODIFICATIONINFOPARAMMASK {
    RIL_PARAM_CMI_EXECUTOR = 0x00000001,
    RIL_PARAM_CMI_ID = 0x00000002,
    RIL_PARAM_CMI_MODIFICATIONTYPE = 0x00000004,
    RIL_PARAM_CMI_OLDCALLTYPE = 0x00000008,
    RIL_PARAM_CMI_NEWCALLTYPE = 0x00000010,
    RIL_PARAM_CMI_ADDRESS = 0x00000020,
    RIL_PARAM_CMI_ALPHAIDENTIFIER = 0x00000040,
    RIL_PARAM_CMI_ALL = 0x0000007F
} RILCALLMODIFICATIONINFOPARAMMASK;

typedef enum RILCALLMODIFICATIONINFOMODIFICATIONTYPE {
    RIL_CALLMODIFICATIONTYPE_UNKNOWN = 0x01,
    RIL_CALLMODIFICATIONTYPE_BLOCKED = 0x02,
    RIL_CALLMODIFICATIONTYPE_MODIFIED = 0x03,
    RIL_CALLMODIFICATIONTYPE_MAX = RIL_CALLMODIFICATIONTYPE_MODIFIED
} RILCALLMODIFICATIONINFOMODIFICATIONTYPE;

typedef struct RILCALLMODIFICATIONINFO {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    DWORD dwID;
    RILCALLMODIFICATIONINFOMODIFICATIONTYPE dwModificationType;
    RILCALLTYPE dwOldCallType;
    RILCALLTYPE dwNewCallType;
    RILADDRESS raAddress;
    RILALPHAIDENTIFIER aiIdentifier;
} RILCALLMODIFICATIONINFO, *LPRILCALLMODIFICATIONINFO;

typedef enum RILCALLINFOPARAMMASK {
    RIL_PARAM_CI_EXECUTOR = 0x00000001,
    RIL_PARAM_CI_ID = 0x00000002,
    RIL_PARAM_CI_DIRECTION = 0x00000004,
    RIL_PARAM_CI_STATUS = 0x00000008,
    RIL_PARAM_CI_TYPE = 0x00000010,
    RIL_PARAM_CI_MULTIPARTY = 0x00000020,
    RIL_PARAM_CI_ADDRESS = 0x00000040,
    RIL_PARAM_CI_SUBADDRESS = 0x00000080,
    RIL_PARAM_CI_DESCRIPTION = 0x00000100,
    RIL_PARAM_CI_NUM_PRES_IND = 0x00000200,
    RIL_PARAM_CI_NAME_PRES_IND = 0x00000400,
    RIL_PARAM_CI_FLAGS = 0x00000800,
    RIL_PARAM_CI_DISCONNECTINITIATOR = 0x00001000,
    RIL_PARAM_CI_DISCONNECTREASON = 0x00002000,
    RIL_PARAM_CI_DISCONNECTDETAILS = 0x00004000,
    RIL_PARAM_CI_OFFERANSWER = 0x00008000,
    RIL_PARAM_CI_HANDOVERSTATE = 0x00010000,
    RIL_PARAM_CI_ALL = 0x0001FFFF
} RILCALLINFOPARAMMASK;

typedef enum RILCALLINFODIRECTION {
    RIL_CALLDIR_INCOMING = 0x01,
    RIL_CALLDIR_OUTGOING = 0x02,
    RIL_CALLDIR_MAX = RIL_CALLDIR_OUTGOING
} RILCALLINFODIRECTION;

typedef enum RILCALLINFOSTATUS {
    RIL_CPISTAT_UNKNOWN = 0x01,
    RIL_CPISTAT_NEW_OUTGOING = 0x02,
    RIL_CPISTAT_NEW_INCOMING = 0x03,
    RIL_CPISTAT_CONNECTED = 0x04,
    RIL_CPISTAT_DISCONNECTED = 0x05,
    RIL_CPISTAT_ONHOLD = 0x06,
    RIL_CPISTAT_MEDIA = 0x07,
    RIL_CPISTAT_HANDOVER = 0x08,
    RIL_CPISTAT_MAX = RIL_CPISTAT_HANDOVER
} RILCALLINFOSTATUS;

typedef enum RILCALLINFOMULTIPARTY {
    RIL_CALL_SINGLEPARTY = 0x01,
    RIL_CALL_MULTIPARTY = 0x02,
    RIL_CALL_MAX = RIL_CALL_MULTIPARTY
} RILCALLINFOMULTIPARTY;

typedef enum RILREMOTEPARTYINFOVALUE {
    RIL_REMOTEPARTYINFO_VALID = 0x01,
    RIL_REMOTEPARTYINFO_WITHHELD = 0x02,
    RIL_REMOTEPARTYINFO_UNAVAILABLE = 0x03,
    RIL_REMOTEPARTYINFO_MAX = RIL_REMOTEPARTYINFO_UNAVAILABLE
} RILREMOTEPARTYINFOVALUE;

typedef enum RILCALLINFOFLAGS {
    RILCALLINFO_FLAG_NONE = 0x00,
    RILCALLINFO_FLAG_ALIENCALL = 0x01,
    RILCALLINFO_FLAG_EMERGENCYCALL = 0x02
} RILCALLINFOFLAGS;

typedef enum RILCALLINFODISCONNECTINITIATOR {
    RIL_DISCINIT_UNKNOWN = 0x01,
    RIL_DISCINIT_LOCAL = 0x02,
    RIL_DISCINIT_REMOTE = 0x03,
    RIL_DISCINIT_MAX = RIL_DISCINIT_REMOTE
} RILCALLINFODISCONNECTINITIATOR;

typedef enum RILCALLINFODISCONNECTREASON {
    RIL_DISCREASON_NULL = 0x01,
    RIL_DISCREASON_BUSY = 0x02,
    RIL_DISCREASON_NETWORKERROR = 0x03,
    RIL_DISCREASON_RADIOFADE = 0x04,
    RIL_DISCREASON_CONGESTION = 0x05,
    RIL_DISCREASON_EMERGENCYONLY = 0x06,
    RIL_DISCREASON_NOSERVICE = 0x07,
    RIL_DISCREASON_OTHEREXECUTORBUSY = 0x08,
    RIL_DISCREASON_EMERGENCYFAILOVER = 0x09,
    RIL_DISCREASON_HANDOVER_MERGE = 0x0A,
    RIL_DISCREASON_MAX = RIL_DISCREASON_HANDOVER_MERGE
} RILCALLINFODISCONNECTREASON;

typedef struct RILCALLINFO_V1 {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    DWORD dwID;
    RILCALLINFODIRECTION dwDirection;
    RILCALLINFOSTATUS dwStatus;
    RILCALLTYPE dwType;
    RILCALLINFOMULTIPARTY dwMultiparty;
    RILADDRESS raAddress;
    RILSUBADDRESS rsaSubAddress;
    WCHAR wszDescription[256];
    RILREMOTEPARTYINFOVALUE dwNumberPresentationIndicator;
    RILREMOTEPARTYINFOVALUE dwNamePresentationIndicator;
    BOOL fAlienCall;
    RILCALLINFODISCONNECTINITIATOR dwDisconnectInitiator;
    RILCALLINFODISCONNECTREASON dwDisconnectReason;
    RILCALLDISCONNECTDETAILS stDisconnectDetails;
} RILCALLINFO_V1, *LPRILCALLINFO_V1;

typedef struct RILCALLINFO_V2 {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    DWORD dwID;
    RILCALLINFODIRECTION dwDirection;
    RILCALLINFOSTATUS dwStatus;
    RILCALLTYPE dwType;
    RILCALLINFOMULTIPARTY dwMultiparty;
    RILADDRESS raAddress;
    RILSUBADDRESS rsaSubAddress;
    WCHAR wszDescription[256];
    RILREMOTEPARTYINFOVALUE dwNumberPresentationIndicator;
    RILREMOTEPARTYINFOVALUE dwNamePresentationIndicator;
    DWORD dwFlags;
    RILCALLINFODISCONNECTINITIATOR dwDisconnectInitiator;
    RILCALLINFODISCONNECTREASON dwDisconnectReason;
    RILCALLDISCONNECTDETAILS stDisconnectDetails;
} RILCALLINFO_V2, *LPRILCALLINFO_V2;

typedef struct RILCALLINFO_V3 {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    DWORD dwID;
    RILCALLINFODIRECTION dwDirection;
    RILCALLINFOSTATUS dwStatus;
    RILCALLTYPE dwType;
    RILCALLINFOMULTIPARTY dwMultiparty;
    RILADDRESS raAddress;
    RILSUBADDRESS rsaSubAddress;
    WCHAR wszDescription[256];
    RILREMOTEPARTYINFOVALUE dwNumberPresentationIndicator;
    RILREMOTEPARTYINFOVALUE dwNamePresentationIndicator;
    DWORD dwFlags;
    RILCALLINFODISCONNECTINITIATOR dwDisconnectInitiator;
    RILCALLINFODISCONNECTREASON dwDisconnectReason;
    RILCALLDISCONNECTDETAILS stDisconnectDetails;
    RILCALLMEDIAOFFERANSWERSET rcmOfferAnswer;
    RILCALLHANDOVERSTATE rchsHandoverState;
} RILCALLINFO_V3, *LPRILCALLINFO_V3, RILCALLINFO, *LPRILCALLINFO;

typedef enum RILCALLWAITINGINFOPARAMMASK {
    RIL_PARAM_CWI_EXECUTOR = 0x00000001,
    RIL_PARAM_CWI_CALLTYPE = 0x00000002,
    RIL_PARAM_CWI_CALLERINFO = 0x00000004,
    RIL_PARAM_CWI_ALL = 0x00000007
} RILCALLWAITINGINFOPARAMMASK;

typedef struct RILREMOTEPARTYINFO {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    RILADDRESS raAddress;
    RILSUBADDRESS rsaSubAddress;
    WCHAR wszDescription[256];
    RILREMOTEPARTYINFOVALUE dwNumberPresentationIndicator;
    RILREMOTEPARTYINFOVALUE dwNamePresentationIndicator;
    DWORD dwID;
} RILREMOTEPARTYINFO, *LPRILREMOTEPARTYINFO;

typedef struct RILCALLWAITINGINFO {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    RILCALLTYPE dwCallType;
    RILREMOTEPARTYINFO rrpiCallerInfo;
} RILCALLWAITINGINFO, *LPRILCALLWAITINGINFO;

typedef enum RILREMOTEPARTYINFOVALUEPARAM {
    RIL_PARAM_RPI_EXECUTOR = 0x00000001,
    RIL_PARAM_RPI_ADDRESS = 0x00000002,
    RIL_PARAM_RPI_SUBADDRESS = 0x00000004,
    RIL_PARAM_RPI_DESCRIPTION = 0x00000008,
    RIL_PARAM_RPI_NUM_PRES_IND = 0x00000010,
    RIL_PARAM_RPI_NAME_PRES_IND = 0x00000020,
    RIL_PARAM_RPI_ID = 0x00000040,
    RIL_PARAM_RPI_ALL = 0x0000007F
} RILREMOTEPARTYINFOVALUEPARAM, RILREMOTEPARTYINFOPARAM;

typedef enum RILDISPLAYINFOPARAMMASK {
    RIL_PARAM_DISPLAY_EXECUTOR = 0x00000001,
    RIL_PARAM_DISPLAY_TYPE = 0x00000002,
    RIL_PARAM_DISPLAY_TAG = 0x00000004,
    RIL_PARAM_DISPLAY_MESSAGESIZE = 0x00000008,
    RIL_PARAM_DISPLAY_MESSAGE = 0x00000010,
    RIL_PARAM_DISPLAY_ALL = 0x0000001F
} RILDISPLAYINFOPARAMMASK;

typedef enum RILDISPLAYINFOTYPE {
    RIL_EXTENDED_DISPLAY_TYPE_NORMAL = 0x00000001
} RILDISPLAYINFOTYPE;

typedef enum RILDISPLAYINFOTAG {
    RIL_EXTENDED_DISPLAY_TAG_BLANK = 0x00000001,
    RIL_EXTENDED_DISPLAY_TAG_SKIP = 0x00000002,
    RIL_EXTENDED_DISPLAY_TAG_CONTINUATION = 0x00000003,
    RIL_EXTENDED_DISPLAY_TAG_CALLED_ADDRESS = 0x00000004,
    RIL_EXTENDED_DISPLAY_TAG_CAUSE = 0x00000005,
    RIL_EXTENDED_DISPLAY_TAG_PROGRESS_INDICATOR = 0x00000006,
    RIL_EXTENDED_DISPLAY_TAG_NOTIFICATION_INDICATOR = 0x00000007,
    RIL_EXTENDED_DISPLAY_TAG_PROMPT = 0x00000008,
    RIL_EXTENDED_DISPLAY_TAG_ACCUMULATED_DIGITS = 0x00000009,
    RIL_EXTENDED_DISPLAY_TAG_STATUS = 0x0000000A,
    RIL_EXTENDED_DISPLAY_TAG_INBAND = 0x0000000B,
    RIL_EXTENDED_DISPLAY_TAG_CALLING_ADDRESS = 0x0000000C,
    RIL_EXTENDED_DISPLAY_TAG_REASON = 0x0000000D,
    RIL_EXTENDED_DISPLAY_TAG_CALLING_PARTY_NAME = 0x0000000E,
    RIL_EXTENDED_DISPLAY_TAG_CALLED_PARTY_NAME = 0x0000000F,
    RIL_EXTENDED_DISPLAY_TAG_ORIGINAL_CALLED_NAME = 0x00000010,
    RIL_EXTENDED_DISPLAY_TAG_REDIRECTING_NAME = 0x00000011,
    RIL_EXTENDED_DISPLAY_TAG_CONNECTED_NAME = 0x00000012,
    RIL_EXTENDED_DISPLAY_TAG_ORIGINATING_RESTRICT = 0x00000013,
    RIL_EXTENDED_DISPLAY_TAG_DATE_TIME_OF_DAY = 0x00000014,
    RIL_EXTENDED_DISPLAY_TAG_CALL_APPEARANCE_ID = 0x00000015,
    RIL_EXTENDED_DISPLAY_TAG_FEATURE_ADDRESS = 0x00000016,
    RIL_EXTENDED_DISPLAY_TAG_REDIRECTION_NAME = 0x00000017,
    RIL_EXTENDED_DISPLAY_TAG_REDIRECTION_NUMBER = 0x00000018,
    RIL_EXTENDED_DISPLAY_TAG_REDIRECTING_NUMBER = 0x00000019,
    RIL_EXTENDED_DISPLAY_TAG_ORIGINAL_CALLED_NUMBER = 0x0000001A,
    RIL_EXTENDED_DISPLAY_TAG_CONNECTED_NUMBER = 0x0000001B,
    RIL_EXTENDED_DISPLAY_TAG_TEXT = 0x0000001C,
    RIL_EXTENDED_DISPLAY_TAG_MAX = RIL_EXTENDED_DISPLAY_TAG_TEXT
} RILDISPLAYINFOTAG;

typedef struct RILDISPLAYINFO {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    RILDISPLAYINFOTYPE dwType;
    RILDISPLAYINFOTAG dwTag;
    DWORD dwMessageSize;
    BYTE pbMessage[1];
} RILDISPLAYINFO, *LPRILDISPLAYINFO;

typedef struct RILCALLLIST_V1 {
    DWORD dwNumberOfCalls;
    RILCALLINFO_V1 rciCallInfo[1];
} RILCALLLIST_V1, *LPRILCALLLIST_V1;

typedef struct RILCALLLIST_V2 {
    DWORD dwNumberOfCalls;
    RILCALLINFO_V2 rciCallInfo[1];
} RILCALLLIST_V2, *LPRILCALLLIST_V2;

typedef struct RILCALLLIST_V3 {
    DWORD dwNumberOfCalls;
    RILCALLINFO_V3 rciCallInfo[1];
} RILCALLLIST_V3, *LPRILCALLLIST_V3, RILCALLLIST, *LPRILCALLLIST;

typedef enum RILEXECUTORFOCUSSTATEPARAMMASK {
    RIL_PARAM_EXECUTORFOCUSSTATE_NUMEXECUTORS = 0x00000001,
    RIL_PARAM_EXECUTORFOCUSSTATE_STATE = 0x00000002,
    RIL_PARAM_EXECUTORFOCUSSTATE_ALL = 0x00000003
} RILEXECUTORFOCUSSTATEPARAMMASK;

typedef struct RILEXECUTORFOCUSSTATE {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwNumberOfExecutors;
    BOOL fFocusStates[2];
} RILEXECUTORFOCUSSTATE, *LPRILEXECUTORFOCUSSTATE;

typedef enum RILUNSOLICITEDSSINFOPARAMMASK {
    RIL_PARAM_UNSSS_EXECUTOR = 0x00000001,
    RIL_PARAM_UNSSS_ID = 0x00000002,
    RIL_PARAM_UNSSS_NOTIFICATIONCODE = 0x00000004,
    RIL_PARAM_UNSSS_ADDRESS = 0x00000008,
    RIL_PARAM_UNSSS_SUBADDR = 0x00000010,
    RIL_PARAM_UNSSS_CUGINDEX = 0x00000020,
    RIL_PARAM_UNSSS_ALL = 0x0000003F
} RILUNSOLICITEDSSINFOPARAMMASK;

typedef enum RILUNSOLICITEDSSINFONOTIFICATIONCODE {
    RIL_UNSSSCODE_FORWARDEDCALL = 0x01,
    RIL_UNSSSCODE_CUGCALL = 0x02,
    RIL_UNSSSCODE_CALLPUTONHOLD = 0x03,
    RIL_UNSSSCODE_CALLRETRIEVED = 0x04,
    RIL_UNSSSCODE_ENTEREDMULTIPARTY = 0x05,
    RIL_UNSSSCODE_HELDCALLRELEASED = 0x06,
    RIL_UNSSSCODE_FORWARDCHECKSS = 0x07,
    RIL_UNSSSCODE_ALERTINGEXPLICITCALLXFER = 0x08,
    RIL_UNSSSCODE_CONNECTEDEXPLICITCALLXFER = 0x09,
    RIL_UNSSSCODE_DEFLECTEDCALL = 0x0A,
    RIL_UNSSSCODE_ADDITIONALINCOMINGCF = 0x0B,
    RIL_UNSSSCODE_UNCONDITIONALCFACTIVE = 0x0C,
    RIL_UNSSSCODE_SOMECONDITIONALCFACTIVE = 0x0D,
    RIL_UNSSSCODE_CALLWASFORWARDED = 0x0E,
    RIL_UNSSSCODE_CALLISWAITING = 0x0F,
    RIL_UNSSSCODE_OUTGOINGCALLSBARRED = 0x10,
    RIL_UNSSSCODE_INCOMINGCALLSBARRED = 0x11,
    RIL_UNSSSCODE_CLIRSUPPRESSREJECT = 0x12,
    RIL_UNSSSCODE_MAX = RIL_UNSSSCODE_CLIRSUPPRESSREJECT
} RILUNSOLICITEDSSINFONOTIFICATIONCODE;

typedef struct RILUNSOLICITEDSSINFO {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    DWORD dwID;
    RILUNSOLICITEDSSINFONOTIFICATIONCODE dwNotificationCode;
    RILADDRESS raAddress;
    RILSUBADDRESS rsaSubAddress;
    DWORD dwCUGIndex;
} RILUNSOLICITEDSSINFO, *LPRILUNSOLICITEDSSINFO;

typedef enum RILSUPSERVICEDATAPARAMMASK {
    RIL_PARAM_SSDI_EXECUTOR = 0x00000001,
    RIL_PARAM_SSDI_STATUS = 0x00000002,
    RIL_PARAM_SSDI_SS_ERROR = 0x00000004,
    RIL_PARAM_SSDI_CC_ERROR = 0x00000008,
    RIL_PARAM_SSDI_VENDOR_ERROR = 0x00000010,
    RIL_PARAM_SSDI_DATASIZE = 0x00000020,
    RIL_PARAM_SSDI_DATA = 0x00000040,
    RIL_PARAM_SSDI_ALL = 0x0000007F
} RILSUPSERVICEDATAPARAMMASK;

typedef enum RILSUPSERVICEDATASTATUS {
    RIL_SUPSVCDATASTATUS_NOINFOREQUIRED = 0x01,
    RIL_SUPSVCDATASTATUS_FURTHERINFOREQUIRED = 0x02,
    RIL_SUPSVCDATASTATUS_TIMEOUT = 0x06,
    RIL_SUPSVCDATASTATUS_ERROR = 0x07,
    RIL_SUPSVCDATASTATUS_MAX = RIL_SUPSVCDATASTATUS_ERROR
} RILSUPSERVICEDATASTATUS;

typedef struct RILSUPSERVICEDATA {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    RILSUPSERVICEDATASTATUS dwStatus;
    DWORD dwNetworkSSErrorCause;
    DWORD dwNetworkCCErrorCause;
    DWORD dwVendorErrorCause;
    DWORD dwDataSize;
    WCHAR wszData[1];
} RILSUPSERVICEDATA, *LPRILSUPSERVICEDATA;

typedef struct RILLINECONTROLINFO {
    DWORD cbSize;
    DWORD dwExecutor;
    BOOL fPolarityIncluded;
    BOOL fToggleMode;
    BOOL fReversePolarity;
    DWORD dwPowerDenialTime;
} RILLINECONTROLINFO, *LPRILLINECONTROLINFO;

typedef enum RILSUPSVCINFOPARAMMASK {
    RIL_PARAM_SSI_EXECUTOR = 0x00000001,
    RIL_PARAM_SSI_FROM_NETWORK = 0x00000002,
    RIL_PARAM_SSI_FAILURE_REASON = 0x00000004,
    RIL_PARAM_SSI_SUPSVC_ACTION = 0x00000008,
    RIL_PARAM_SSI_SUPSVC_TYPE = 0x00000010,
    RIL_PARAM_SSI_CALL_FORWARDING_REASON = 0x00000020,
    RIL_PARAM_SSI_CALL_BARRING_TYPE = 0x00000040,
    RIL_PARAM_SSI_INFOCLASSES = 0x00000080,
    RIL_PARAM_SSI_ALPHA_IDENTIFIER = 0x00000100,
    RIL_PARAM_SSI_CALL_BARRING_PASSWORD = 0x00000200,
    RIL_PARAM_SSI_NEW_CALL_BARRING_PASSWORD = 0x00000400,
    RIL_PARAM_SSI_CALL_FORWARDING_SETTINGS = 0x00000800,
    RIL_PARAM_SSI_CALLER_ID_SETTINGS = 0x00001000,
    RIL_PARAM_SSI_DIALED_ID_SETTINGS = 0x00002000,
    RIL_PARAM_SSI_HIDE_ID_SETTINGS = 0x00004000,
    RIL_PARAM_SSI_CONNECTED_ID_SETTINGS = 0x00008000,
    RIL_PARAM_SSI_SUPSERVICE_DATA = 0x00010000,
    RIL_PARAM_SSI_ALL = 0x0001FFFF
} RILSUPSVCINFOPARAMMASK;

typedef enum RILSUPSVCTYPE {
    RIL_SUPSVCTYPE_CALLWAITING = 0x01,
    RIL_SUPSVCTYPE_CLIP = 0x02,
    RIL_SUPSVCTYPE_CLIR = 0x03,
    RIL_SUPSVCTYPE_COLP = 0x04,
    RIL_SUPSVCTYPE_COLR = 0x05,
    RIL_SUPSVCTYPE_CNAP = 0x06,
    RIL_SUPSVCTYPE_MAX = RIL_SUPSVCTYPE_CNAP
} RILSUPSVCTYPE;

typedef enum RILSUPSVCACTION {
    RIL_SUPSVCACTION_ACTIVATE = 0x01,
    RIL_SUPSVCACTION_DEACTIVATE = 0x02,
    RIL_SUPSVCACTION_REGISTER = 0x03,
    RIL_SUPSVCACTION_ERASE = 0x04,
    RIL_SUPSVCACTION_INTERROGATE = 0x05,
    RIL_SUPSVCACTION_REGISTER_PW = 0x06,
    RIL_SUPSVCACTION_USSD = 0x07,
    RIL_SUPSVCACTION_MAX = RIL_SUPSVCACTION_USSD
} RILSUPSVCACTION;

typedef struct RILSUPSVCINFO {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    DWORD fFromNetwork;
    DWORD dwFailureReason;
    RILSUPSVCACTION dwSupSvcAction;
    RILCALLFORWARDINGSETTINGSREASON dwCallForwardingReason;
    RILCALLBARRINGSTATUSPARAMSTYPE dwCallBarringType;
    RILSUPSVCTYPE dwSupSvcType;
    DWORD dwInfoClasses;
    RILALPHAIDENTIFIER aiIdentifier;
    char szCallBarringPassword[256];
    char szNewCallBarringPassword[256];
    RILCALLFORWARDINGSETTINGS callForwardSettings;
    RILCALLERIDSETTINGS callerIdSettings;
    RILDIALEDIDSETTINGS dialedIdSettings;
    RILHIDEIDSETTINGS hideIdSettings;
    RILHIDECONNECTEDIDSETTINGS hideConnectedIdSettings;
    RILSUPSERVICEDATA supServiceData;
} RILSUPSVCINFO, *LPRILSUPSVCINFO;

typedef enum RILADDITIONALCALLERINFOPARAMMASK {
    RIL_PARAM_ADDTLCI_EXECUTOR = 0x00000001,
    RIL_PARAM_ADDTLCI_CALLID = 0x00000002,
    RIL_PARAM_ADDTLCI_CALLERINFOLENGTH = 0x00000004,
    RIL_PARAM_ADDTLCI_CALLERINFO = 0x00000008,
    RIL_PARAM_ADDTLCI_ALL = 0x0000000F
} RILADDITIONALCALLERINFOPARAMMASK;

typedef struct RILADDITIONALCALLERINFO {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    DWORD dwCallId;
    DWORD dwCallerInfoLength;
    WCHAR wszCallerInfo[1];
} RILADDITIONALCALLERINFO, *LPRILADDITIONALCALLERINFO;

typedef struct RILSENDDTMFPARAMS {
    DWORD dwExecutor;
    char szDTMF[256];
    DWORD dwDigitOnTimeMs;
    DWORD dwDigitOffTimeMs;
} RILSENDDTMFPARAMS, *LPRILSENDDTMFPARAMS;

typedef struct RILSTARTDTMFPARAMS {
    DWORD dwExecutor;
    char ch;
} RILSTARTDTMFPARAMS, *LPRILSTARTDTMFPARAMS;

typedef enum RILTONESIGNALINFOPARAMMASK {
    RIL_PARAM_TONESIGNAL_GPPTONE = 0x00000001,
    RIL_PARAM_TONESIGNAL_GPP2TONE = 0x00000002,
    RIL_PARAM_TONESIGNAL_GPP2ISDNALERTING = 0x00000004,
    RIL_PARAM_TONESIGNAL_EXECUTOR = 0x00000008,
    RIL_PARAM_TONESIGNAL_All = 0x0000000F
} RILTONESIGNALINFOPARAMMASK;

typedef enum RIL3GPPTONE {
    RIL_3GPPTONE_TONEOFF = 0x01,
    RIL_3GPPTONE_RINGBACK = 0x02,
    RIL_3GPPTONE_BUSY = 0x03,
    RIL_3GPPTONE_CONGESTION = 0x04,
    RIL_3GPPTONE_AUTHENTICATIONFAILURE = 0x05,
    RIL_3GPPTONE_NUMBERUNOBTAINABLE = 0x06,
    RIL_3GPPTONE_CALLDROPPED = 0x07,
    RIL_3GPPTONE_MAX = RIL_3GPPTONE_CALLDROPPED
} RIL3GPPTONE;

typedef enum RIL3GPP2TONE {
    RIL_3GPP2TONE_TONEOFF = 0x01,
    RIL_3GPP2TONE_DIAL = 0x02,
    RIL_3GPP2TONE_RINGBACK = 0x03,
    RIL_3GPP2TONE_INTERCEPT = 0x04,
    RIL_3GPP2TONE_ABRVINTERCEPT = 0x05,
    RIL_3GPP2TONE_REORDER = 0x06,
    RIL_3GPP2TONE_ABRVREORDER = 0x07,
    RIL_3GPP2TONE_BUSY = 0x08,
    RIL_3GPP2TONE_CONFIRM = 0x09,
    RIL_3GPP2TONE_ANSWER = 0x0A,
    RIL_3GPP2TONE_CALLWAITING = 0x0B,
    RIL_3GPP2TONE_PIP = 0x0C,
    RIL_3GPP2TONE_MAX = RIL_3GPP2TONE_PIP
} RIL3GPP2TONE;

typedef enum RIL3GPP2ISDNALERTING {
    RIL_3GPP2ISDNALERTING_ALERTINGOFF = 0x01,
    RIL_3GPP2ISDNALERTING_NORMAL = 0x02,
    RIL_3GPP2ISDNALERTING_INTERGROUP = 0x03,
    RIL_3GPP2ISDNALERTING_SPECIAL = 0x04,
    RIL_3GPP2ISDNALERTING_PINGRING = 0x05,
    RIL_3GPP2ISDNALERTING_MAX = RIL_3GPP2ISDNALERTING_PINGRING
} RIL3GPP2ISDNALERTING;

typedef struct RILTONESIGNALINFO_V1 {
    DWORD cbSize;
    DWORD dwParams;
    RIL3GPPTONE dwGPPTone;
    RIL3GPP2TONE dwGPP2Tone;
    RIL3GPP2ISDNALERTING dwGPP2IsdnAlerting;
} RILTONESIGNALINFO_V1, *LPRILTONESIGNALINFO_V1;

typedef struct RILTONESIGNALINFO_V2 {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    RIL3GPPTONE dwGPPTone;
    RIL3GPP2TONE dwGPP2Tone;
    RIL3GPP2ISDNALERTING dwGPP2IsdnAlerting;
} RILTONESIGNALINFO_V2, *LPRILTONESIGNALINFO_V2, RILTONESIGNALINFO, *LPRILTONESIGNALINFO;

typedef enum RILSMSSUPPORTCAPS {
    RIL_CAPS_SMSSUPPORT_PERSISTLINK = 0x00000001,
    RIL_CAPS_SMSSUPPORT_16BITREFERENCENUMBER = 0x00000002,
    RIL_CAPS_SMSSUPPORT_ALL = 0x00000003
} RILSMSSUPPORTCAPS;

typedef enum RILMSGSERVICEINFOPARAMMASK {
    RIL_PARAM_MSI_MSGSUPPORT = 0x00000001,
    RIL_PARAM_MSI_STOREUSED = 0x00000002,
    RIL_PARAM_MSI_STORETOTAL = 0x00000004,
    RIL_PARAM_MSI_ALL = 0x00000007
} RILMSGSERVICEINFOPARAMMASK;

typedef enum RILMSGSERVICEINFOMSGSUPPORT {
    RIL_MSI_SMS_INCOMING = 0x00000001,
    RIL_MSI_SMS_OUTGOING = 0x00000002,
    RIL_MSI_SMS_BROADCAST = 0x00000004
} RILMSGSERVICEINFOMSGSUPPORT;

typedef struct RILMSGSERVICEINFO {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwMsgSupport;
    DWORD dwStoreUsed;
    DWORD dwStoreTotal;
} RILMSGSERVICEINFO, *LPRILMSGSERVICEINFO;

typedef struct RILREADMSGPARAMS {
    HUICCAPP hUiccApp;
    DWORD dwIndex;
} RILREADMSGPARAMS, *LPRILREADMSGPARAMS;

typedef enum RILMESSAGEINFOPARAMMASK {
    RIL_PARAM_MI_INDEX = 0x00000001,
    RIL_PARAM_MI_STATUS = 0x00000002,
    RIL_PARAM_MI_MESSAGE = 0x00000004,
    RIL_PARAM_MI_ALL = 0x00000007
} RILMESSAGEINFOPARAMMASK;

typedef enum RILMESSAGESTATUS {
    RIL_MSGSTATUS_UNKNOWN = 0x01,
    RIL_MSGSTATUS_RECUNREAD = 0x02,
    RIL_MSGSTATUS_RECREAD = 0x03,
    RIL_MSGSTATUS_STOUNSENT = 0x04,
    RIL_MSGSTATUS_STOSENT = 0x05,
    RIL_MSGSTATUS_MAX = RIL_MSGSTATUS_STOSENT
} RILMESSAGESTATUS;

typedef struct RILMESSAGEINFO {
    DWORD cbSize;
    HUICCAPP hUiccApp;
    DWORD dwParams;
    DWORD dwIndex;
    RILMESSAGESTATUS dwStatus;
    RILMESSAGE rmMessage;
} RILMESSAGEINFO, *LPRILMESSAGEINFO;

typedef struct RILWRITEMSGPARAMS {
    HUICCAPP hUiccApp;
    RILMESSAGE rmMessage;
    RILMESSAGESTATUS dwStatus;
} RILWRITEMSGPARAMS, *LPRILWRITEMSGPARAMS;

typedef struct RILDELETEMSGPARAMS {
    HUICCAPP hUiccApp;
    DWORD dwIndex;
} RILDELETEMSGPARAMS, *LPRILDELETEMSGPARAMS;

typedef enum RILCBMSGCONFIGPARAMMASK {
    RIL_PARAM_CBMC_GWLSIZE = 0x00000001,
    RIL_PARAM_CBMC_GWLINFO = 0x00000002,
    RIL_PARAM_CBMC_CDMASIZE = 0x00000004,
    RIL_PARAM_CBMC_CDMAINFO = 0x00000008,
    RIL_PARAM_CBMC_ALL = 0x0000000F
} RILCBMSGCONFIGPARAMMASK;

typedef struct RILCBGWLCONFIGINFO {
    BOOL fAccept;
    RILRANGE rgrrBroadcastMsgID;
} RILCBGWLCONFIGINFO, *LPRILCBGWLCONFIGINFO;

typedef struct RILCBCDMACONFIGINFO {
    BOOL fAccept;
    DWORD dwBroadcastMsgLang;
    DWORD dwBroadcastServiceCategory;
} RILCBCDMACONFIGINFO, *LPRILCBCDMACONFIGINFO;

typedef struct RILCBMSGCONFIG {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwGWLConfigInfoSize;
    RILCBGWLCONFIGINFO GWLConfigInfo[50];
    DWORD dwCDMAConfigInfoSize;
    RILCBCDMACONFIGINFO CDMAConfigInfo[50];
} RILCBMSGCONFIG, *LPRILCBMSGCONFIG;

typedef struct RILSETCELLBROADCASTMSGCONFIGPARAMS {
    HUICCAPP hUiccApp;
    RILCBMSGCONFIG rmCBConfig;
} RILSETCELLBROADCASTMSGCONFIGPARAMS, *LPRILSETCELLBROADCASTMSGCONFIGPARAMS;

typedef struct RILGETMSGINUICCSTATUSPARAMS {
    HUICCAPP hUiccApp;
    DWORD dwIndex;
} RILGETMSGINUICCSTATUSPARAMS, *LPRILGETMSGINUICCSTATUSPARAMS;

typedef struct RILSETMSGINUICCSTATUSPARAMS {
    HUICCAPP hUiccApp;
    DWORD dwIndex;
    RILMESSAGESTATUS dwStatus;
} RILSETMSGINUICCSTATUSPARAMS, *LPRILSETMSGINUICCSTATUSPARAMS;

typedef enum RILSENDMSGOPTIONS {
    RIL_SENDOPT_NONE = 0x00000000,
    RIL_SENDOPT_PERSISTLINK = 0x00000001,
    RIL_SENDOPT_IMS = 0x00000002
} RILSENDMSGOPTIONS;

typedef struct RILSENDMSGPARAMS {
    DWORD dwExecutor;
    HUICCAPP hUiccApp;
    RILMESSAGE rmMessage;
    DWORD dwOptions;
} RILSENDMSGPARAMS, *LPRILSENDMSGPARAMS;

typedef enum RILSENDMSGRESPONSEPARAMMASK {
    RIL_PARAM_MSGRES_RETURN = 0x00000001,
    RIL_PARAM_MSGRES_CDMACAUSECODE = 0x00000002,
    RIL_PARAM_MSGRES_CDMAERRORCLASS = 0x00000004,
    RIL_PARAM_MSGRES_GWLTRANSPORTCODE = 0x00000008,
    RIL_PARAM_MSGRES_GWLRELAYCODE = 0x00000010,
    RIL_PARAM_MSGRES_MSGID = 0x00000020,
    RIL_PARAM_MSGRES_ALL = 0x0000003F
} RILSENDMSGRESPONSEPARAMMASK;

typedef struct RILSENDMSGRESPONSE {
    DWORD cbSize;
    DWORD dwParams;
    HRESULT hrReturn;
    DWORD dwCDMACauseCode;
    DWORD dwCDMAErrorClass;
    DWORD dwGWLTransportCode;
    DWORD dwGWLRelayCode;
    DWORD dwMsgID;
} RILSENDMSGRESPONSE, *LPRILSENDMSGRESPONSE;

typedef struct RILSETSMSCPARAMS {
    HUICCAPP hUiccApp;
    RILADDRESS raSvcCtrAddress;
} RILSETSMSCPARAMS, *LPRILSETSMSCPARAMS;

typedef struct RILGETIMSPARAMS {
    DWORD cbSize;
    DWORD dwExecutor;
} RILGETIMSPARAMS, *LPRILGETIMSPARAMS;

typedef enum RILMSGACKSTATUS {
    RIL_MSGACKSTATUS_STORED = 0x01,
    RIL_MSGACKSTATUS_FAIL_MEM_FULL = 0x02,
    RIL_MSGACKSTATUS_ERROR = 0x03,
    RIL_MSGACKSTATUS_MAX = RIL_MSGACKSTATUS_ERROR
} RILMSGACKSTATUS;

typedef enum RILSMSACKOPT {
    RIL_SMSACKOPT_NONE = 0x00,
    RIL_SMSACKOPT_IMS = 0x01
} RILSMSACKOPT;

typedef struct RILSENDMSGACKPARAMS_V1 {
    DWORD cbSize;
    DWORD dwExecutor;
    HUICCAPP hUiccApp;
    DWORD dwAckID;
    RILMSGACKSTATUS dwMsgStatus;
} RILSENDMSGACKPARAMS_V1;

typedef struct RILSENDMSGACKPARAMS_V2 {
    DWORD cbSize;
    DWORD dwExecutor;
    HUICCAPP hUiccApp;
    DWORD dwAckID;
    RILMSGACKSTATUS dwMsgStatus;
    RILSMSFORMAT dwSmsFormat;
    DWORD dwOptions;
} RILSENDMSGACKPARAMS_V2, RILSENDMSGACKPARAMS, *LPRILSENDMSGACKPARAMS;

typedef struct RILMESSAGEIN_V1 {
    DWORD cbSize;
    DWORD dwExecutor;
    HUICCAPP hUiccApp;
    DWORD dwAckID;
    RILMESSAGE rm;
} RILMESSAGEIN_V1;

typedef enum RILSMSMSGINFLAGS {
    RIL_SMSMSGIN_NONE = 0x00,
    RIL_SMSMSGIN_IMS = 0x01,
    RIL_SMSMSGIN_ALL = 0x01
} RILSMSMSGINFLAGS;

typedef struct RILMESSAGEIN_V2 {
    DWORD cbSize;
    DWORD dwExecutor;
    HUICCAPP hUiccApp;
    DWORD dwAckID;
    RILMESSAGE rm;
    DWORD dwFlags;
} RILMESSAGEIN_V2, RILMESSAGEIN, *LPRILMESSAGEIN;

typedef struct RILMESSAGEINUICC {
    DWORD cbSize;
    DWORD dwExecutor;
    HUICCAPP hUiccApp;
    DWORD dwIndex;
} RILMESSAGEINUICC, *LPRILMESSAGEINUICC;

typedef enum RILIMSSSTATUSPARAMMASK {
    RIL_PARAM_IMSSTATUS_EXECUTOR = 0x00000001,
    RIL_PARAM_IMSSTATUS_HUICCAPP = 0x00000002,
    RIL_PARAM_IMSSTATUS_AVAILABLESERVICES = 0x00000004,
    RIL_PARAM_IMSSTATUS_SMSSUPPORTEDFORMAT = 0x00000008,
    RIL_PARAM_IMSSTATUS_SERVINGDOMAIN = 0x00000010,
    RIL_PARAM_IMSSTATUS_SYSTEMTYPE = 0x00000020,
    RIL_PARAM_IMSSTATUS_ALL = 0x0000003F
} RILIMSSSTATUSPARAMMASK;

typedef struct RILIMSSTATUS_V1 {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    HUICCAPP hUiccApp;
    DWORD dwAvailableServices;
    RILSMSFORMAT dwSMSSupportedFormat;
} RILIMSSTATUS_V1, *LPRILIMSSTATUS_V1;

typedef struct RILIMSSTATUS_V2 {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    HUICCAPP hUiccApp;
    DWORD dwAvailableServices;
    RILSMSFORMAT dwSMSSupportedFormat;
    WCHAR wszServingDomain[256];
} RILIMSSTATUS_V2, *LPRILIMSSTATUS_V2;

typedef struct RILIMSSTATUS_V3 {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    HUICCAPP hUiccApp;
    DWORD dwAvailableServices;
    RILSMSFORMAT dwSMSSupportedFormat;
    WCHAR wszServingDomain[256];
    RILIMSSYSTEMTYPE dwIMSSystemType;
} RILIMSSTATUS_V3, *LPRILIMSSTATUS_V3, RILIMSSTATUS, *LPRILIMSSTATUS;

typedef struct RILMESSAGESTORAGEFULL {
    DWORD cbSize;
    DWORD dwExecutor;
    HUICCAPP hUiccApp;
} RILMESSAGESTORAGEFULL, *LPRILMESSAGESTORAGEFULL;

typedef struct RILSMSMODIFICATIONINFO {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    DWORD dwModificationType;
    RILADDRESS raAddress;
    RILALPHAIDENTIFIER aiIdentifier;
} RILSMSMODIFICATIONINFO, *LPRILSMSMODIFICATIONINFO;

typedef enum RILIMSFAILUREMESSAGETYPE {
    RIL_IMSFAILUREMESSAGETYPE_REGISTER = 0x00000000,
    RIL_IMSFAILUREMESSAGETYPE_SUBSCRIBE = 0x00000001,
    RIL_IMSFAILUREMESSAGETYPE_INCALL = 0x00000002,
    RIL_IMSFAILUREMESSAGETYPE_MAX = RIL_IMSFAILUREMESSAGETYPE_INCALL
} RILIMSFAILUREMESSAGETYPE;

typedef enum RILIMSSUBSCRIBETYPE {
    RIL_IMSSUBSCRIBETYPE_REG = 0x00000000,
    RIL_IMSSUBSCRIBETYPE_MWI = 0x00000001,
    RIL_IMSSUBSCRIBETYPE_CONFERENCE = 0x00000002,
    RIL_IMSSUBSCRIBETYPE_MAX = RIL_IMSSUBSCRIBETYPE_CONFERENCE
} RILIMSSUBSCRIBETYPE;

typedef enum RILIMSFAILUREPARAMMASK {
    RIL_PARAM_IMSFAILURE_EXECUTOR = 0x00000001,
    RIL_PARAM_IMSFAILURE_MESSAGETYPE = 0x00000002,
    RIL_PARAM_IMSFAILURE_MESSAGESUBTYPE = 0x00000004,
    RIL_PARAM_IMSFAILURE_ERRORCODE = 0x00000008,
    RIL_PARAM_IMSFAILURE_ERRORSTRING = 0x00000010,
    RIL_PARAM_IMSFAILURE_ALL = 0x0000001f
} RILIMSFAILUREPARAMMASK;

typedef struct RILIMSFAILURE {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    RILIMSFAILUREMESSAGETYPE dwMessageType;
    DWORD dwMessageSubType;
    DWORD dwErrorCode;
    WCHAR wszErrorString[256];
} RILIMSFAILURE, *LPRILIMSFAILURE;

typedef enum RILMSGMWITYPE {
    RIL_MSGMWITYPE_NONE = 0x00000000,
    RIL_MSGMWITYPE_VOICEMAIL = 0x00000001,
    RIL_MSGMWITYPE_VIDEOMAIL = 0x00000002,
    RIL_MSGMWITYPE_FAX = 0x00000003,
    RIL_MSGMWITYPE_PAGER = 0x00000004,
    RIL_MSGMWITYPE_MULTIMEDIA = 0x00000005,
    RIL_MSGMWITYPE_TEXT = 0x00000006,
    RIL_MSGMWITYPE_MAX = RIL_MSGMWITYPE_TEXT
} RILMSGMWITYPE;

typedef struct RILMSGMWISUMMARY {
    RILMSGMWITYPE dwMwiType;
    DWORD dwNumberOfNewMessages;
    DWORD dwNumberOfOldMessages;
    DWORD dwNumberOfNewUrgentMessages;
    DWORD dwNumberOfOldUrgentMessages;
} RILMSGMWISUMMARY, *LPRILMSGMWISUMMARY;

typedef enum RILMSGMWISUMMARYLISTPARAMMASK {
    RIL_PARAM_MWISUMMARY_EXECUTOR = 0x00000001,
    RIL_PARAM_MWISUMMARY_REFNUM = 0x00000002,
    RIL_PARAM_MWISUMMARY_ACCTADDR = 0x00000004,
    RIL_PARAM_MWISUMMARY_TOTALNUMDETAILITEMS = 0x00000008,
    RIL_PARAM_MWISUMMARY_NUMSUMMARYITEMS = 0x00000010,
    RIL_PARAM_MWISUMMARY_SUMMARYITEMS = 0x00000020,
    RIL_PARAM_MWISUMMARY_ALL = 0x0000003F
} RILMSGMWISUMMARYLISTPARAMMASK;

typedef struct RILMSGMWISUMMARYLIST {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    DWORD dwReferenceNumber;
    RILADDRESS stAccountAddress;
    DWORD dwTotalNumberOfDetailItems;
    DWORD dwNumberOfSummaryItems;
    RILMSGMWISUMMARY stMwiSummary[1];
} RILMSGMWISUMMARYLIST, *LPRILMSGMWISUMMARYLIST;

typedef enum RILMSGMWIPRIORITY {
    RIL_MSGMWIPRIORITY_UNKNOWN = 0x00000000,
    RIL_MSGMWIPRIORITY_LOW = 0x00000001,
    RIL_MSGMWIPRIORITY_NORMAL = 0x00000002,
    RIL_MSGMWIPRIORITY_URGENT = 0x00000003,
    RIL_MSGMWIPRIORITY_EMERGENCY = 0x00000004,
    RIL_MSGMWIPRIORITY_MAX = RIL_MSGMWIPRIORITY_EMERGENCY
} RILMSGMWIPRIORITY;

typedef struct RILMSGMWIDETAIL {
    RILMSGMWITYPE dwMwiType;
    RILMSGMWIPRIORITY dwMwiPriority;
    RILADDRESS raToAddress;
    RILADDRESS raFromAddress;
    RILSYSTEMTIME stDateSent;
    WCHAR wszSubject[256];
    WCHAR wszMessageId[256];
} RILMSGMWIDETAIL, *LPRILMSGMWIDETAIL;

typedef enum RILMSGMWIDETAILLISTPARAMMASK {
    RIL_PARAM_MWIDETAIL_EXECUTOR = 0x00000001,
    RIL_PARAM_MWIDETAIL_REFNUM = 0x00000002,
    RIL_PARAM_MWIDETAIL_NUMDETAILITEMS = 0x00000004,
    RIL_PARAM_MWIDETAIL_DETAILITEMS = 0x00000008,
    RIL_PARAM_MWIDETAIL_ALL = 0x0000000F
} RILMSGMWIDETAILLISTPARAMMASK;

typedef struct RILMSGMWIDETAILLIST {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwExecutor;
    DWORD dwReferenceNumber;
    DWORD dwNumberOfDetailItems;
    RILMSGMWIDETAIL stMwiDetail[1];
} RILMSGMWIDETAILLIST, *LPRILMSGMWIDETAILLIST;

typedef enum RILGSMMNMRPARAMMASK {
    RIL_PARAM_GSMNMR_MCC = 0x00000001,
    RIL_PARAM_GSMNMR_MNC = 0x00000002,
    RIL_PARAM_GSMNMR_LAC = 0x00000004,
    RIL_PARAM_GSMNMR_CELLID = 0x00000008,
    RIL_PARAM_GSMNMR_ARFCN = 0x00000010,
    RIL_PARAM_GSMNMR_BSID = 0x00000020,
    RIL_PARAM_GSMNMR_RXLEVEL = 0x00000040,
    RIL_PARAM_GSMNMR_ALL = 0x0000007f
} RILGSMMNMRPARAMMASK;

typedef struct RILGSMNMR {
    DWORD dwParams;
    DWORD dwMobileCountryCode;
    DWORD dwMobileNetworkCode;
    DWORD dwLocationAreaCode;
    DWORD dwCellID;
    DWORD dwARFCN;
    DWORD dwBaseStationID;
    DWORD dwRxLevel;
} RILGSMNMR, *LPRILGSMNMR;

typedef enum RILUMTSMRLPARAMMASK {
    RIL_PARAM_UMTSMRL_MCC = 0x00000001,
    RIL_PARAM_UMTSMRL_MNC = 0x00000002,
    RIL_PARAM_UMTSMRL_LAC = 0x00000004,
    RIL_PARAM_UMTSMRL_CELLID = 0x00000008,
    RIL_PARAM_UMTSMRL_UARFCN = 0x00000010,
    RIL_PARAM_UMTSMRL_PRIMARY_SC = 0x00000020,
    RIL_PARAM_UMTSMRL_RSCP = 0x00000040,
    RIL_PARAM_UMTSMRL_ECNO = 0x00000080,
    RIL_PARAM_UMTSMRL_PATHLOSS = 0x00000100,
    RIL_PARAM_UMTSMRL_ALL = 0x000001ff
} RILUMTSMRLPARAMMASK;

typedef struct RILUMTSMRL {
    DWORD dwParams;
    DWORD dwMobileCountryCode;
    DWORD dwMobileNetworkCode;
    DWORD dwLocationAreaCode;
    DWORD dwCellID;
    DWORD dwUARFCN;
    DWORD dwPrimaryScramblingCode;
    LONG dwRSCP;
    LONG dwECNO;
    DWORD dwPathLoss;
} RILUMTSMRL, *LPRILUMTSMRL;

typedef enum RILTDSCDMAMRLPARAMMASK {
    RIL_PARAM_TDSCDMAMRL_MCC = 0x00000001,
    RIL_PARAM_TDSCDMAMRL_MNC = 0x00000002,
    RIL_PARAM_TDSCDMAMRL_LAC = 0x00000004,
    RIL_PARAM_TDSCDMAMRL_CELLID = 0x00000008,
    RIL_PARAM_TDSCDMAMRL_UARFCN = 0x00000010,
    RIL_PARAM_TDSCDMAMRL_CELLPARAM = 0x00000020,
    RIL_PARAM_TDSCDMAMRL_RSCP = 0x00000040,
    RIL_PARAM_TDSCDMAMRL_PATHLOSS = 0x00000080,
    RIL_PARAM_TDSCDMAMRL_ALL = 0x000000ff
} RILTDSCDMAMRLPARAMMASK;

typedef struct RILTDSCDMAMRL {
    DWORD dwParams;
    DWORD dwMobileCountryCode;
    DWORD dwMobileNetworkCode;
    DWORD dwLocationAreaCode;
    DWORD dwCellID;
    DWORD dwUARFCN;
    DWORD dwCellParameterID;
    DWORD dwRSCP;
    DWORD dwPathLoss;
} RILTDSCDMAMRL, *LPRILTDSCDMAMRL;

typedef enum RILEUTRAMRLPARAMMASK {
    RIL_PARAM_EUTRAMRL_MCC = 0x00000001,
    RIL_PARAM_EUTRAMRL_MNC = 0x00000002,
    RIL_PARAM_EUTRAMRL_CELLID = 0x00000004,
    RIL_PARAM_EUTRAMRL_EARFCN = 0x00000008,
    RIL_PARAM_EUTRAMRL_PHYSCELLID = 0x00000010,
    RIL_PARAM_EUTRAMRL_TAC = 0x00000020,
    RIL_PARAM_EUTRAMRL_RSRP = 0x00000040,
    RIL_PARAM_EUTRAMRL_RSRQ = 0x00000080,
    RIL_PARAM_EUTRAMRL_ALL = 0x000000ff
} RILEUTRAMRLPARAMMASK;

typedef struct RILEUTRAMRL {
    DWORD dwParams;
    DWORD dwMobileCountryCode;
    DWORD dwMobileNetworkCode;
    DWORD dwCellID;
    DWORD dwEARFCN;
    DWORD dwPhysCellID;
    DWORD dwTAC;
    LONG dwRSRP;
    LONG dwRSRQ;
} RILEUTRAMRL, *LPRILEUTRAMRL;

typedef enum RILC2KMRLPARAMMASK {
    RIL_PARAM_C2KMRL_SERVING = 0x00000001,
    RIL_PARAM_C2KMRL_NID = 0x00000002,
    RIL_PARAM_C2KMRL_SID = 0x00000004,
    RIL_PARAM_C2KMRL_BSID = 0x00000008,
    RIL_PARAM_C2KMRL_BASELAT = 0x00000010,
    RIL_PARAM_C2KMRL_BASELONG = 0x00000020,
    RIL_PARAM_C2KMRL_REFPN = 0x00000040,
    RIL_PARAM_C2KMRL_GPSSECONDS = 0x00000080,
    RIL_PARAM_C2KMRL_PILOTSTRENGTH = 0x00000100,
    RIL_PARAM_C2KRML_ALL = 0x000001ff
} RILC2KMRLPARAMMASK;

typedef struct RILC2KMRL {
    DWORD dwParams;
    BOOL fServing;
    DWORD dwNID;
    DWORD dwSID;
    DWORD dwBaseStationID;
    DWORD dwBaseLat;
    DWORD dwBaseLong;
    DWORD dwRefPN;
    DWORD dwGPSSeconds;
    DWORD dwPilotStrength;
} RILC2KMRL, *LPRILC2KMRL;

typedef enum RILPOSITIONINFOGSMPARAMMASK {
    RIL_PARAM_POSITION_GSM_MCC = 0x00000001,
    RIL_PARAM_POSITION_GSM_MNC = 0x00000002,
    RIL_PARAM_POSITION_GSM_LAC = 0x00000004,
    RIL_PARAM_POSITION_GSM_CELLID = 0x00000008,
    RIL_PARAM_POSITION_GSM_TA = 0x00000010,
    RIL_PARAM_POSITION_GSM_ARFCN = 0x00000020,
    RIL_PARAM_POSITION_GSM_BSID = 0x00000040,
    RIL_PARAM_POSITION_GSM_RXLEVEL = 0x00000080,
    RIL_PARAM_POSITION_GSM_ALL = 0x000000ff
} RILPOSITIONINFOGSMPARAMMASK;

typedef struct RILPOSITIONINFOGSM {
    DWORD dwParams;
    DWORD dwMobileCountryCode;
    DWORD dwMobileNetworkCode;
    DWORD dwLocationAreaCode;
    DWORD dwCellID;
    DWORD dwTimingAdvance;
    DWORD dwARFCN;
    DWORD dwBaseStationID;
    DWORD dwRxLevel;
} RILPOSITIONINFOGSM, *LPRILPOSITIONINFOGSM;

typedef enum RILPOSITIONINFOUMTSPARAMMASK {
    RIL_PARAM_POSITION_UMTS_MCC = 0x00000001,
    RIL_PARAM_POSITION_UMTS_MNC = 0x00000002,
    RIL_PARAM_POSITION_UMTS_LAC = 0x00000004,
    RIL_PARAM_POSITION_UMTS_CELLID = 0x00000008,
    RIL_PARAM_POSITION_UMTS_FREQINFO_UL = 0x00000010,
    RIL_PARAM_POSITION_UMTS_FREQINFO_DL = 0x00000020,
    RIL_PARAM_POSITION_UMTS_FREQINFO_NT = 0x00000040,
    RIL_PARAM_POSITION_UMTS_UARFCN = 0x00000080,
    RIL_PARAM_POSITION_UMTS_PRIMARY_SC = 0x00000100,
    RIL_PARAM_POSITION_UMTS_RSCP = 0x00000200,
    RIL_PARAM_POSITION_UMTS_ECNO = 0x00000400,
    RIL_PARAM_POSITION_UMTS_PATHLOSS = 0x00000800,
    RIL_PARAM_POSITION_UMTS_ALL = 0x00000fff
} RILPOSITIONINFOUMTSPARAMMASK;

typedef struct RILPOSITIONINFOUMTS {
    DWORD dwParams;
    DWORD dwMobileCountryCode;
    DWORD dwMobileNetworkCode;
    DWORD dwLocationAreaCode;
    DWORD dwCellID;
    DWORD dwFrequencyInfoUL;
    DWORD dwFrequencyInfoDL;
    DWORD dwFrequencyInfoNT;
    DWORD dwUARFCN;
    DWORD dwPrimaryScramblingCode;
    LONG dwRSCP;
    LONG dwECNO;
    DWORD dwPathLoss;
} RILPOSITIONINFOUMTS, *LPRILPOSITIONINFOUMTS;

typedef enum RILPOSITIONINFOTDSCDMAPARAMMASK {
    RIL_PARAM_POSITION_TDSCDMA_MCC = 0x00000001,
    RIL_PARAM_POSITION_TDSCDMA_MNC = 0x00000002,
    RIL_PARAM_POSITION_TDSCDMA_LAC = 0x00000004,
    RIL_PARAM_POSITION_TDSCDMA_CELLID = 0x00000008,
    RIL_PARAM_POSITION_TDSCDMA_UARFCN = 0x00000010,
    RIL_PARAM_POSITION_TDSCDMA_CELLPARAM = 0x00000020,
    RIL_PARAM_POSITION_TDSCDMA_TA = 0x00000040,
    RIL_PARAM_POSITION_TDSCDMA_RSCP = 0x00000080,
    RIL_PARAM_POSITION_TDSCDMA_PATHLOSS = 0x00000100,
    RIL_PARAM_POSITION_TDSCDMA_ALL = 0x000001ff
} RILPOSITIONINFOTDSCDMAPARAMMASK;

typedef struct RILPOSITIONINFOTDSCDMA {
    DWORD dwParams;
    DWORD dwMobileCountryCode;
    DWORD dwMobileNetworkCode;
    DWORD dwLocationAreaCode;
    DWORD dwCellID;
    DWORD dwUARFCN;
    DWORD dwCellParameterID;
    DWORD dwTimingAdvance;
    DWORD dwRSCP;
    DWORD dwPathLoss;
} RILPOSITIONINFOTDSCDMA, *LPRILPOSITIONINFOTDSCDMA;

typedef enum RILPOSITIONINFOLTEPARAMMASK {
    RIL_PARAM_POSITION_LTE_MCC = 0x00000001,
    RIL_PARAM_POSITION_LTE_MNC = 0x00000002,
    RIL_PARAM_POSITION_LTE_CELLID = 0x00000004,
    RIL_PARAM_POSITION_LTE_EARFCN = 0x00000008,
    RIL_PARAM_POSITION_LTE_PHYSCELLID = 0x00000010,
    RIL_PARAM_POSITION_LTE_TAC = 0x00000020,
    RIL_PARAM_POSITION_LTE_RSRP = 0x00000040,
    RIL_PARAM_POSITION_LTE_RSRQ = 0x00000080,
    RIL_PARAM_POSITION_LTE_TA = 0x00000100,
    RIL_PARAM_POSITION_LTE_ALL = 0x000001ff
} RILPOSITIONINFOLTEPARAMMASK;

typedef struct RILPOSITIONINFOLTE {
    DWORD dwParams;
    DWORD dwMobileCountryCode;
    DWORD dwMobileNetworkCode;
    DWORD dwCellID;
    DWORD dwEARFCN;
    DWORD dwPhysCellID;
    DWORD dwTAC;
    LONG dwRSRP;
    LONG dwRSRQ;
    DWORD dwTimingAdvance;
} RILPOSITIONINFOLTE, *LPRILPOSITIONINFOLTE;

typedef struct RILPOSITIONINFO_V1 {
    DWORD cbSize;
    DWORD dwSystemType;
    RILPOSITIONINFOGSM stGSMServingCellInfo;
    RILPOSITIONINFOUMTS stUMTSServingCellInfo;
    RILPOSITIONINFOLTE stLTEServingCellInfo;
    DWORD dwCntGSMNMR;
    RILGSMNMR rgNMR[15];
    DWORD dwCntUMTSMRL;
    RILUMTSMRL ruMRL[15];
    DWORD dwCntEUTRAMRL;
    RILEUTRAMRL reMRL[15];
    DWORD dwCntC2KMRL;
    RILC2KMRL rc2kMRL[12];
} RILPOSITIONINFO_V1, *LPRILPOSITIONINFO_V1;

typedef struct RILPOSITIONINFO_V2 {
    DWORD cbSize;
    DWORD dwSystemType;
    RILPOSITIONINFOGSM stGSMServingCellInfo;
    RILPOSITIONINFOUMTS stUMTSServingCellInfo;
    RILPOSITIONINFOTDSCDMA stTDSCDMAServingCellInfo;
    RILPOSITIONINFOLTE stLTEServingCellInfo;
    DWORD dwCntGSMNMR;
    RILGSMNMR rgNMR[15];
    DWORD dwCntUMTSMRL;
    RILUMTSMRL ruMRL[15];
    DWORD dwCntTDSCDMAMRL;
    RILTDSCDMAMRL rtMRL[15];
    DWORD dwCntEUTRAMRL;
    RILEUTRAMRL reMRL[15];
    DWORD dwCntC2KMRL;
    RILC2KMRL rc2kMRL[12];
} RILPOSITIONINFO_V2, *LPRILPOSITIONINFO_V2, RILPOSITIONINFO, *LPRILPOSITIONINFO;

typedef enum RILRADIOSTATEGROUPID {
    RIL_RADIOSTATE_GROUP_UNSPECIFIED = 0xFFFFFFFF
} RILRADIOSTATEGROUPID;

typedef enum RILRADIOSTATEGROUPFLAGS {
    RIL_RADIOSTATE_GROUPFLAG_NONE = 0x0000,
    RIL_RADIOSTATE_GROUPFLAG_HASSUBGROUPS = 0x8000
} RILRADIOSTATEGROUPFLAGS;

typedef struct RILRADIOSTATEGROUP {
    DWORD dwGroupId;
    DWORD dwGroupType;
    DWORD dwGroupFlags;
    WCHAR wszGroupText[32];
} RILRADIOSTATEGROUP, *LPRILRADIOSTATEGROUP;

typedef struct RILRADIOSTATEGROUPS {
    DWORD dwCntGroups;
    RILRADIOSTATEGROUP rilGroups[1];
} RILRADIOSTATEGROUPS, *LPRILRADIOSTATEGROUPS;

typedef enum RILRADIOSTATEITEMID {
    RIL_RADIOSTATE_ITEM_UNSPECIFIED = 0xFFFFFFFF
} RILRADIOSTATEITEMID;

typedef struct RILGETRADIOSTATEDETAILSPARAMS {
    DWORD dwGroupId;
    DWORD dwItemId;
} RILGETRADIOSTATEDETAILSPARAMS, *LPRILGETRADIOSTATEDETAILSPARAMS;

typedef enum RILRADIOSTATEITEMFLAG {
    RIL_RADIOSTATE_ITEMFLAG_USE_INTVAL = 0x0001,
    RIL_RADIOSTATE_ITEMFLAG_USE_UINTVAL = 0x0002,
    RIL_RADIOSTATE_ITEMFLAG_USE_WSZVAL = 0x0003,
    RIL_RADIOSTATE_ITEMFLAG_USE_INTARRAY = 0x0004,
    RIL_RADIOSTATE_ITEMFLAG_USE_UINTARRAY = 0x0005,
    RIL_RADIOSTATE_ITEMFLAG_USE_BYTEARRAY = 0x0006,
    RIL_RADIOSTATE_ITEMFLAG_USE_MAX = RIL_RADIOSTATE_ITEMFLAG_USE_BYTEARRAY
} RILRADIOSTATEITEMFLAG;

typedef enum RILRADIOSTATEITEMATTRIBUTES {
    RIL_RADIOSTATE_ITEM_ATTRIBUTE_NO_ATTRIBUTE = 0x0000,
    RIL_RADIOSTATE_ITEM_ATTRIBUTE_ISDIRTY = 0x0001,
    RIL_RADIOSTATE_ITEM_ATTRIBUTE_ISWRITABLE = 0x0002,
    RIL_RADIOSTATE_ITEM_ATTRIBUTE_HAVEOPTIONS = 0x0004,
    RIL_RADIOSTATE_ITEM_ATTRIBUTE_ALL = 0x0007
} RILRADIOSTATEITEMATTRIBUTES;

typedef struct RILRADIOSTATEITEM {
    DWORD dwItemId;
    RILRADIOSTATEITEMFLAG dwItemFlag;
    DWORD dwItemAttributes;
     union RILITEMVALUEUNION {
        
            int intVal;
        
            unsigned int uintVal;
        
            WCHAR wszVal[32];
        
            int intArray[16];
        
            unsigned int uintArray[16];
        
            BYTE byteArray[64];
    } itemValueUnion;
    WCHAR wszFriendlyName[32];
    WCHAR wszItemValueOptions[256];
} RILRADIOSTATEITEM, *LPRILRADIOSTATEITEM;

typedef struct RILRADIOSTATEITEMS {
    DWORD dwGroupId;
    DWORD dwCntItems;
    RILRADIOSTATEITEM rilItems[1];
} RILRADIOSTATEITEMS, *LPRILRADIOSTATEITEMS;

typedef struct RILRADIOSTATEPASSWORD {
    DWORD dwPasswordId;
    WCHAR wszPassword[32];
} RILRADIOSTATEPASSWORD, *LPRILRADIOSTATEPASSWORD;

typedef enum RILRFSTATEPARAMMASK {
    RIL_PARAM_RFSTATE_NONE = 0x00000000,
    RIL_PARAM_RFSTATE_RFSTATE = 0x00000001,
    RIL_PARAM_RFSTATE_RFDATASIZE = 0x00000002,
    RIL_PARAM_RFSTATE_RFDATA = 0x00000004,
    RIL_PARAM_RFSTATE_ALL = 0x00000007
} RILRFSTATEPARAMMASK;

typedef struct RILRFSTATE {
    DWORD cbSize;
    DWORD dwParams;
    DWORD dwRFState;
    DWORD dwRFDataSize;
    BYTE bRFData[1];
} RILRFSTATE, *LPRILRFSTATE;

typedef enum RILCDMAAVOIDANCEREQUESTYPE {
    RIL_AVOID_SYS_IDLE = 0x00000001,
    RIL_AVOID_SYS_CLR_LIST = 0x00000002
} RILCDMAAVOIDANCEREQUESTYPE;

typedef struct RILAVOIDCDMASYSTEMPARAMS {
    DWORD dwExecutor;
    RILCDMAAVOIDANCEREQUESTYPE dwAvoidanceReqType;
} RILAVOIDCDMASYSTEMPARAMS, *LPRILAVOIDCDMASYSTEMPARAMS;

typedef enum RILERRORCODES {
    RIL_E_PHONEFAILURE = 0x80000000 | 0x01000000 | 0x0001,
    RIL_E_NOCONNECTION = 0x80000000 | 0x01000000 | 0x0002,
    RIL_E_LINKRESERVED = 0x80000000 | 0x01000000 | 0x0003,
    RIL_E_OPNOTALLOWED = 0x80000000 | 0x01000000 | 0x0004,
    RIL_E_OPNOTSUPPORTED = 0x80000000 | 0x01000000 | 0x0005,
    RIL_E_UICCNOTINSERTED = 0x80000000 | 0x01000000 | 0x0006,
    RIL_E_UICCFAILURE = 0x80000000 | 0x01000000 | 0x0007,
    RIL_E_UICCBUSY = 0x80000000 | 0x01000000 | 0x0008,
    RIL_E_UICCWRONG = 0x80000000 | 0x01000000 | 0x0009,
    RIL_E_INCORRECTPASSWORD = 0x80000000 | 0x01000000 | 0x000A,
    RIL_E_MEMORYFULL = 0x80000000 | 0x01000000 | 0x000B,
    RIL_E_INVALIDINDEX = 0x80000000 | 0x01000000 | 0x000C,
    RIL_E_NOTFOUND = 0x80000000 | 0x01000000 | 0x000D,
    RIL_E_MEMORYFAILURE = 0x80000000 | 0x01000000 | 0x000E,
    RIL_E_TEXTSTRINGTOOLONG = 0x80000000 | 0x01000000 | 0x000F,
    RIL_E_INVALIDTEXTSTRING = 0x80000000 | 0x01000000 | 0x0010,
    RIL_E_DIALSTRINGTOOLONG = 0x80000000 | 0x01000000 | 0x0011,
    RIL_E_INVALIDDIALSTRING = 0x80000000 | 0x01000000 | 0x0012,
    RIL_E_NONETWORKSVC = 0x80000000 | 0x01000000 | 0x0013,
    RIL_E_NETWORKTIMEOUT = 0x80000000 | 0x01000000 | 0x0014,
    RIL_E_EMERGENCYONLY = 0x80000000 | 0x01000000 | 0x0015,
    RIL_E_TELEMATICIWUNSUPPORTED = 0x80000000 | 0x01000000 | 0x0016,
    RIL_E_SMTYPE0UNSUPPORTED = 0x80000000 | 0x01000000 | 0x0017,
    RIL_E_CANTREPLACEMSG = 0x80000000 | 0x01000000 | 0x0018,
    RIL_E_PROTOCOLIDERROR = 0x80000000 | 0x01000000 | 0x0019,
    RIL_E_DCSUNSUPPORTED = 0x80000000 | 0x01000000 | 0x001A,
    RIL_E_MSGCLASSUNSUPPORTED = 0x80000000 | 0x01000000 | 0x001B,
    RIL_E_DCSERROR = 0x80000000 | 0x01000000 | 0x001C,
    RIL_E_CMDCANTBEACTIONED = 0x80000000 | 0x01000000 | 0x001D,
    RIL_E_CMDUNSUPPORTED = 0x80000000 | 0x01000000 | 0x001E,
    RIL_E_CMDERROR = 0x80000000 | 0x01000000 | 0x001F,
    RIL_E_MSGBODYHEADERERROR = 0x80000000 | 0x01000000 | 0x0020,
    RIL_E_SCBUSY = 0x80000000 | 0x01000000 | 0x0021,
    RIL_E_NOSCSUBSCRIPTION = 0x80000000 | 0x01000000 | 0x0022,
    RIL_E_SCSYSTEMFAILURE = 0x80000000 | 0x01000000 | 0x0023,
    RIL_E_INVALIDADDRESS = 0x80000000 | 0x01000000 | 0x0024,
    RIL_E_DESTINATIONBARRED = 0x80000000 | 0x01000000 | 0x0025,
    RIL_E_REJECTEDDUPLICATE = 0x80000000 | 0x01000000 | 0x0026,
    RIL_E_VPFUNSUPPORTED = 0x80000000 | 0x01000000 | 0x0027,
    RIL_E_VPUNSUPPORTED = 0x80000000 | 0x01000000 | 0x0028,
    RIL_E_UICCMSGSTORAGEFULL = 0x80000000 | 0x01000000 | 0x0029,
    RIL_E_NOUICCMSGSTORAGE = 0x80000000 | 0x01000000 | 0x002A,
    RIL_E_UICCTOOLKITBUSY = 0x80000000 | 0x01000000 | 0x002B,
    RIL_E_UICCDOWNLOADERROR = 0x80000000 | 0x01000000 | 0x002C,
    RIL_E_MSGSVCRESERVED = 0x80000000 | 0x01000000 | 0x002D,
    RIL_E_INVALIDMSGPARAM = 0x80000000 | 0x01000000 | 0x002E,
    RIL_E_INVALIDSCADDRESS = 0x80000000 | 0x01000000 | 0x002F,
    RIL_E_UNASSIGNEDNUMBER = 0x80000000 | 0x01000000 | 0x0030,
    RIL_E_MSGBARREDBYOPERATOR = 0x80000000 | 0x01000000 | 0x0031,
    RIL_E_MSGCALLBARRED = 0x80000000 | 0x01000000 | 0x0032,
    RIL_E_MSGXFERREJECTED = 0x80000000 | 0x01000000 | 0x0033,
    RIL_E_DESTINATIONOUTOFSVC = 0x80000000 | 0x01000000 | 0x0034,
    RIL_E_UNIDENTIFIEDSUBCRIBER = 0x80000000 | 0x01000000 | 0x0035,
    RIL_E_SVCUNSUPPORTED = 0x80000000 | 0x01000000 | 0x0036,
    RIL_E_UNKNOWNSUBSCRIBER = 0x80000000 | 0x01000000 | 0x0037,
    RIL_E_NETWKOUTOFORDER = 0x80000000 | 0x01000000 | 0x0038,
    RIL_E_NETWKTEMPFAILURE = 0x80000000 | 0x01000000 | 0x0039,
    RIL_E_CONGESTION = 0x80000000 | 0x01000000 | 0x003A,
    RIL_E_RESOURCESUNAVAILABLE = 0x80000000 | 0x01000000 | 0x003B,
    RIL_E_SVCNOTSUBSCRIBED = 0x80000000 | 0x01000000 | 0x003C,
    RIL_E_SVCNOTIMPLEMENTED = 0x80000000 | 0x01000000 | 0x003D,
    RIL_E_INVALIDMSGREFERENCE = 0x80000000 | 0x01000000 | 0x003E,
    RIL_E_INVALIDMSG = 0x80000000 | 0x01000000 | 0x003F,
    RIL_E_INVALIDMANDATORYINFO = 0x80000000 | 0x01000000 | 0x0040,
    RIL_E_MSGTYPEUNSUPPORTED = 0x80000000 | 0x01000000 | 0x0041,
    RIL_E_ICOMPATIBLEMSG = 0x80000000 | 0x01000000 | 0x0042,
    RIL_E_INFOELEMENTUNSUPPORTED = 0x80000000 | 0x01000000 | 0x0043,
    RIL_E_PROTOCOLERROR = 0x80000000 | 0x01000000 | 0x0044,
    RIL_E_NETWORKERROR = 0x80000000 | 0x01000000 | 0x0045,
    RIL_E_MESSAGINGERROR = 0x80000000 | 0x01000000 | 0x0046,
    RIL_E_NOTREADY = 0x80000000 | 0x01000000 | 0x0047,
    RIL_E_TIMEDOUT = 0x80000000 | 0x01000000 | 0x0048,
    RIL_E_CANCELLED = 0x80000000 | 0x01000000 | 0x0049,
    RIL_E_NONOTIFYCALLBACK = 0x80000000 | 0x01000000 | 0x004A,
    RIL_E_OPFMTUNAVAILABLE = 0x80000000 | 0x01000000 | 0x004B,
    RIL_E_NORESPONSETODIAL = 0x80000000 | 0x01000000 | 0x004C,
    RIL_E_SECURITYFAILURE = 0x80000000 | 0x01000000 | 0x004D,
    RIL_E_RADIOFAILEDINIT = 0x80000000 | 0x01000000 | 0x004E,
    RIL_E_DRIVERINITFAILED = 0x80000000 | 0x01000000 | 0x004F,
    RIL_E_RADIONOTPRESENT = 0x80000000 | 0x01000000 | 0x0050,
    RIL_E_RADIOOFF = 0x80000000 | 0x01000000 | 0x0051,
    RIL_E_ILLEGALMS = 0x80000000 | 0x01000000 | 0x0052,
    RIL_E_ILLEGALME = 0x80000000 | 0x01000000 | 0x0053,
    RIL_E_GPRSSERVICENOTALLOWED = 0x80000000 | 0x01000000 | 0x0054,
    RIL_E_PLMNNOTALLOWED = 0x80000000 | 0x01000000 | 0x0055,
    RIL_E_LOCATIONAREANOTALLOWED = 0x80000000 | 0x01000000 | 0x0056,
    RIL_E_ROAMINGNOTALLOWEDINTHISLOCATIONAREA = 0x80000000 | 0x01000000 | 0x0057,
    RIL_E_SERVICEOPTIONNOTSUPPORTED = 0x80000000 | 0x01000000 | 0x0058,
    RIL_E_REQUESTEDSERVICEOPTIONNOTSUBSCRIBED = 0x80000000 | 0x01000000 | 0x0059,
    RIL_E_SERVICEOPTIONTEMPORARILYOUTOFORDER = 0x80000000 | 0x01000000 | 0x005A,
    RIL_E_PDPAUTHENTICATIONFAILURE = 0x80000000 | 0x01000000 | 0x005B,
    RIL_E_INVALIDMOBILECLASS = 0x80000000 | 0x01000000 | 0x005C,
    RIL_E_UNSPECIFIEDGPRSERROR = 0x80000000 | 0x01000000 | 0x005D,
    RIL_E_RADIOREBOOTED = 0x80000000 | 0x01000000 | 0x005E,
    RIL_E_INVALIDCONTEXTSTATE = 0x80000000 | 0x01000000 | 0x005F,
    RIL_E_MAXCONTEXTS = 0x80000000 | 0x01000000 | 0x0060,
    RIL_E_SYNCHRONOUS_DATA_UNAVAILABLE = 0x80000000 | 0x01000000 | 0x0061,
    RIL_E_FDNRESTRICT = 0x80000000 | 0x01000000 | 0x0062,
    RIL_E_INVALIDASYNCCOMMANDRESPONSE = 0x80000000 | 0x01000000 | 0x0063,
    RIL_E_INCOMPATIBLEPROXYDRIVER = 0x80000000 | 0x01000000 | 0x0064,
    RIL_E_INVALIDDRIVERVERSION = 0x80000000 | 0x01000000 | 0x0065,
    RIL_E_USIMCALLMODIFIED = 0x80000000 | 0x01000000 | 0x0066,
    RIL_E_PASSWORDMISMATCH = 0x80000000 | 0x01000000 | 0x0067,
    RIL_E_INVALIDCONTEXTACTIVATIONSTRING = 0x80000000 | 0x01000000 | 0x0068,
    RIL_E_UICCAPPINACCESSIBLE = 0x80000000 | 0x01000000 | 0x0069,
    RIL_E_UICCPINREQUIRED = 0x80000000 | 0x01000000 | 0x006A,
    RIL_E_UICCPUKREQUIRED = 0x80000000 | 0x01000000 | 0x006B,
    RIL_E_UICCPUKBLOCKED = 0x80000000 | 0x01000000 | 0x006C,
    RIL_E_EXECUTORNOTREADY = 0x80000000 | 0x01000000 | 0x006D,
    RIL_E_INVALIDUICCKEYREF = 0x80000000 | 0x01000000 | 0x006E,
    RIL_E_UICCINACTIVE = 0x80000000 | 0x01000000 | 0x006F,
    RIL_E_PERSOPUKREQUIRED = 0x80000000 | 0x01000000 | 0x0070,
    RIL_E_PERSOPUKBLOCKED = 0x80000000 | 0x01000000 | 0x0071,
    RIL_E_PERSOCHECKFAILED = 0x80000000 | 0x01000000 | 0x0072,
    RIL_E_INVALIDUICCPATH = 0x80000000 | 0x01000000 | 0x0073,
    RIL_E_IMSTEMPFAILURE = 0x80000000 | 0x01000000 | 0x0074,
    RIL_E_UICCNOTREADY = 0x80000000 | 0x01000000 | 0x0075,
    RIL_E_UICCPOWEROFF = 0x80000000 | 0x01000000 | 0x0076,
    RIL_E_CALLISACTIVE = 0x80000000 | 0x01000000 | 0x0077,
    RIL_E_USIMCALLBLOCKED = 0x80000000 | 0x01000000 | 0x0078,
    RIL_E_UICCADMRESTRICTED = 0x80000000 | 0x01000000 | 0x0079,
    RIL_E_DMSERVICENOTREADY = 0x80000000 | 0x01000000 | 0x007A,
    RIL_E_DMGETCONFIGFAILED = 0x80000000 | 0x01000000 | 0x007B,
    RIL_E_DMCOMMITFAILED = 0x80000000 | 0x01000000 | 0x007C,
    RIL_E_OTHEREXECUTORBUSY = 0x80000000 | 0x01000000 | 0x007D,
    RIL_E_IMSNOHANDOVERTARGETFOUND = 0x80000000 | 0x01000000 | 0x007E,
    RIL_E_VCCHANDOVERINPROGRESS = 0x80000000 | 0x01000000 | 0x007F,
    RIL_E_INVALIDREMOTEURI = 0x80000000 | 0x01000000 | 0x0080
} RILERRORCODES;

typedef struct RILNOTIFICATIONPARAMS {
    DWORD dwNotificationCount;
    DWORD pdwNotifications[1];
} RILNOTIFICATIONPARAMS, *LPRILNOTIFICATIONPARAMS;

typedef enum RILNOTIFICATIONCLASSES {
    RIL_NCLASS_FUNCRESULT = 0x00000000,
    RIL_NCLASS_NOTIFICATIONS = 0x10000000
} RILNOTIFICATIONCLASSES;

typedef enum RILFUNCTIONRESULTS {
    RIL_RESULT_OK = 0x00000001 | RIL_NCLASS_FUNCRESULT,
    RIL_RESULT_ERROR = 0x00000002 | RIL_NCLASS_FUNCRESULT
} RILFUNCTIONRESULTS;

typedef enum RILNOTIFICATIONS {
    RIL_NOTIFY_OEM_MAX = 0x000000FF | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_RADIOEQUIPMENTSTATECHANGED = 0x00000100 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_RADIOPRESENCECHANGED = 0x00000101 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_UICCFILE_DATACHANGE = 0x00000102 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_UICCAPP_DATACHANGE = 0x00000103 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_SLOTINFOCHANGED = 0x00000104 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_CARDAPPREMOVED = 0x00000105 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_CARDAPPADDED = 0x00000106 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_UICCLOCKSTATUS = 0x00000107 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_UICCAPPPERSOCHECKSTATUS = 0x00000108 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_PHONEBOOKENTRYDELETED = 0x00000109 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_PHONEBOOKENTRYSTORED = 0x0000010A | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_PHONEBOOKREADYSTATE = 0x0000010B | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_EMERGENCYNUMBERLISTCHANGED = 0x0000010C | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_REGSTATUSCHANGED = 0x0000010D | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_LOCATIONUPDATE = 0x0000010E | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_NETWORKCODECHANGED = 0x0000010F | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_PROVISION_STATUS = 0x00000110 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_SYSTEMPREFSCHANGED = 0x00000111 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_EXECUTORSTATE = 0x00000112 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_MANAGED_ROAMING = 0x00000113 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_SIGNALQUALITY = 0x00000114 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_NITZ = 0x00000115 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_UICCTOOLKITCMD = 0x00000116 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_CALLMODIFICATIONINFO = 0x00000117 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_CALLPROGRESSINFO = 0x00000118 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_EMERGENCYMODEENTERED = 0x00000119 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_EMERGENCYMODEEXITED = 0x0000011A | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_CALLWAITING = 0x0000011B | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_DIALEDID = 0x0000011C | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_DISPLAY = 0x0000011D | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_SUPSVCINFO = 0x0000011E | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_SUPSERVICEDATA = 0x0000011F | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_UNSOLICITEDSS = 0x00000120 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_LINECONTROL = 0x00000121 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_MESSAGE = 0x00000122 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_MESSAGE_IN_UICC = 0x00000123 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_IMSSTATUS = 0x00000124 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_ADDITIONALNUMBERSTRINGUPDATED = 0x00000125 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_SUPSERVICEDATATERMINATED = 0x00000126 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_CLEARIDLEMODETEXT = 0x00000127 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_MESSAGE_STORAGE_FULL = 0x00000128 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_TONESIGNAL = 0x00000129 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_FORWARDSTARTDTMF = 0x0000012A | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_FORWARDSTOPDTMF = 0x0000012B | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_FORWARDBURSTDTMF = 0x0000012C | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_EXECUTORFOCUSSTATECHANGED = 0x0000012D | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_EXECUTORRFSTATE = 0x0000012E | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_MODEMRESET = 0x0000012F | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_RADIOCONFIGURATION = 0x00000130 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_IMSHANDOVERATTEMPT = 0x00000131 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_ADDITIONALCALLERINFO = 0x00000132 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_MWISUMMARY = 0x00000133 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_MWIDETAILS = 0x00000134 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_IMSFAILURE = 0x00000135 | RIL_NCLASS_NOTIFICATIONS,
    RIL_NOTIFY_COUNT = 0x00000136 | RIL_NCLASS_NOTIFICATIONS
} RILNOTIFICATIONS;

typedef enum RILCOMMANDS {
    RIL_COMMAND_INITNOTIFICATIONS = 0x00000001,
    RIL_COMMAND_GETNEXTNOTIFICATION = 0x00000002,
    RIL_COMMAND_ENABLENOTIFICATIONS = 0x00000003,
    RIL_COMMAND_DISABLENOTIFICATIONS = 0x00000004,
    RIL_COMMAND_GETDRIVERVERSION = 0x00000005,
    RIL_COMMAND_GETDEVCAPS = 0x00000006,
    RIL_COMMAND_GETDEVICEINFO = 0x00000007,
    RIL_COMMAND_GETEQUIPMENTSTATE = 0x00000008,
    RIL_COMMAND_SETEQUIPMENTSTATE = 0x00000009,
    RIL_COMMAND_SETNOTIFICATIONFILTERSTATE = 0x0000000A,
    RIL_COMMAND_GETNOTIFICATIONFILTERSTATE = 0x0000000B,
    RIL_COMMAND_ENUMERATESLOTS = 0x0000000C,
    RIL_COMMAND_GETCARDINFO = 0x0000000D,
    RIL_COMMAND_SETSLOTPOWER = 0x0000000E,
    RIL_COMMAND_GETUICCRECORDSTATUS = 0x0000000F,
    RIL_COMMAND_SENDRESTRICTEDUICCCMD = 0x00000010,
    RIL_COMMAND_WATCHUICCFILECHANGE = 0x00000011,
    RIL_COMMAND_GETUICCPRLID = 0x00000012,
    RIL_COMMAND_GETIMSI = 0x00000013,
    RIL_COMMAND_GETSUBSCRIBERNUMBERS = 0x00000014,
    RIL_COMMAND_GETUICCLOCKSTATE = 0x00000015,
    RIL_COMMAND_GETUICCSERVICELOCK = 0x00000016,
    RIL_COMMAND_VERIFYUICCLOCK = 0x00000017,
    RIL_COMMAND_SETUICCLOCKENABLED = 0x00000018,
    RIL_COMMAND_UNBLOCKUICCLOCK = 0x00000019,
    RIL_COMMAND_CHANGEUICCLOCKPASSWORD = 0x0000001A,
    RIL_COMMAND_GETUICCAPPPERSOCHECKSTATE = 0x0000001B,
    RIL_COMMAND_GETPERSODEACTIVATIONSTATE = 0x0000001C,
    RIL_COMMAND_DEACTIVATEPERSO = 0x0000001D,
    RIL_COMMAND_READPHONEBOOKENTRIES = 0x0000001E,
    RIL_COMMAND_WRITEPHONEBOOKENTRY = 0x0000001F,
    RIL_COMMAND_DELETEPHONEBOOKENTRY = 0x00000020,
    RIL_COMMAND_GETPHONEBOOKOPTIONS = 0x00000021,
    RIL_COMMAND_GETALLADDITIONALNUMBERSTRINGS = 0x00000022,
    RIL_COMMAND_GETALLEMERGENCYNUMBERS = 0x00000023,
    RIL_COMMAND_SETRADIOCONFIGURATION = 0x00000024,
    RIL_COMMAND_GETRADIOCONFIGURATION = 0x00000025,
    RIL_COMMAND_SETEXECUTORCONFIG = 0x00000026,
    RIL_COMMAND_GETEXECUTORCONFIG = 0x00000027,
    RIL_COMMAND_SETSYSTEMSELECTIONPREFS = 0x00000028,
    RIL_COMMAND_GETSYSTEMSELECTIONPREFS = 0x00000029,
    RIL_COMMAND_GETOPERATORLIST = 0x0000002A,
    RIL_COMMAND_GETPREFERREDOPERATORLIST = 0x0000002B,
    RIL_COMMAND_GETCURRENTREGSTATUS = 0x0000002C,
    RIL_COMMAND_GETSIGNALQUALITY = 0x0000002D,
    RIL_COMMAND_SENDUICCTOOLKITCMDRESPONSE = 0x0000002F,
    RIL_COMMAND_SENDUICCTOOLKITENVELOPE = 0x00000030,
    RIL_COMMAND_DIAL = 0x00000031,
    RIL_COMMAND_MANAGECALLS = 0x00000032,
    RIL_COMMAND_EMERGENCYMODECONTROL = 0x00000033,
    RIL_COMMAND_GETCALLFORWARDINGSETTINGS = 0x00000034,
    RIL_COMMAND_SETCALLFORWARDINGSTATUS = 0x00000035,
    RIL_COMMAND_ADDCALLFORWARDING = 0x00000036,
    RIL_COMMAND_REMOVECALLFORWARDING = 0x00000037,
    RIL_COMMAND_GETCALLBARRINGSTATUS = 0x00000038,
    RIL_COMMAND_SETCALLBARRINGSTATUS = 0x00000039,
    RIL_COMMAND_CHANGECALLBARRINGPASSWORD = 0x0000003A,
    RIL_COMMAND_GETCALLWAITINGSETTINGS = 0x0000003B,
    RIL_COMMAND_SETCALLWAITINGSTATUS = 0x0000003C,
    RIL_COMMAND_GETCALLERIDSETTINGS = 0x0000003D,
    RIL_COMMAND_GETDIALEDIDSETTINGS = 0x0000003E,
    RIL_COMMAND_GETHIDECONNECTEDIDSETTINGS = 0x0000003F,
    RIL_COMMAND_GETHIDEIDSETTINGS = 0x00000040,
    RIL_COMMAND_SENDFLASH = 0x00000041,
    RIL_COMMAND_SENDSUPSERVICEDATA = 0x00000042,
    RIL_COMMAND_SENDDTMF = 0x00000043,
    RIL_COMMAND_STARTDTMF = 0x00000044,
    RIL_COMMAND_STOPDTMF = 0x00000045,
    RIL_COMMAND_GETMSGSERVICEOPTIONS = 0x00000046,
    RIL_COMMAND_READMSG = 0x00000047,
    RIL_COMMAND_WRITEMSG = 0x00000048,
    RIL_COMMAND_DELETEMSG = 0x00000049,
    RIL_COMMAND_GETCELLBROADCASTMSGCONFIG = 0x0000004A,
    RIL_COMMAND_SETCELLBROADCASTMSGCONFIG = 0x0000004B,
    RIL_COMMAND_GETMSGINUICCSTATUS = 0x0000004C,
    RIL_COMMAND_SETMSGINUICCSTATUS = 0x0000004D,
    RIL_COMMAND_SETMSGMEMORYSTATUS = 0x0000004E,
    RIL_COMMAND_SENDMSG = 0x0000004F,
    RIL_COMMAND_GETSMSC = 0x00000050,
    RIL_COMMAND_SETSMSC = 0x00000051,
    RIL_COMMAND_GETIMSSTATUS = 0x00000052,
    RIL_COMMAND_GETPOSITIONINFO = 0x00000053,
    RIL_COMMAND_GETRADIOSTATEGROUPS = 0x00000054,
    RIL_COMMAND_GETRADIOSTATEDETAILS = 0x00000055,
    RIL_COMMAND_SETRADIOSTATEDETAILS = 0x00000056,
    RIL_COMMAND_RADIOSTATEPASSWORDCOMPARE = 0x00000057,
    RIL_COMMAND_RADIOSTATEGETPASSWORDRETRYCOUNT = 0x00000058,
    RIL_COMMAND_DEVSPECIFIC = 0x00000059,
    RIL_COMMAND_SETRFSTATE = 0x0000005A,
    RIL_COMMAND_GETRFSTATE = 0x0000005B,
    RIL_COMMAND_GETDMPROFILECONFIGINFO = 0x0000005C,
    RIL_COMMAND_SETDMPROFILECONFIGINFO = 0x0000005D,
    RIL_COMMAND_WRITEADDITIONALNUMBERSTRING = 0x0000005E,
    RIL_COMMAND_DELETEADDITIONALNUMBERSTRING = 0x0000005F,
    RIL_COMMAND_GETUICCATR = 0x00000060,
    RIL_COMMAND_OPENUICCLOGICALCHANNEL = 0x00000061,
    RIL_COMMAND_CLOSEUICCLOGICALCHANNEL = 0x00000062,
    RIL_COMMAND_EXCHANGEUICCAPDU = 0x00000063,
    RIL_COMMAND_SENDSUPSERVICEDATARESPONSE = 0x00000064,
    RIL_COMMAND_CANCELSUPSERVICEDATASESSION = 0x00000065,
    RIL_COMMAND_SETUICCTOOLKITPROFILE = 0x00000066,
    RIL_COMMAND_GETUICCTOOLKITPROFILE = 0x00000067,
    RIL_COMMAND_REGISTERUICCTOOLKITSERVICE = 0x00000068,
    RIL_COMMAND_SENDMSGACK = 0x00000069,
    RIL_COMMAND_CLOSEUICCLOGICALCHANNELGROUP = 0x0000006A,
    RIL_COMMAND_SETPREFERREDOPERATORLIST = 0x0000006B,
    RIL_COMMAND_GETUICCSERVICESTATE = 0x0000006C,
    RIL_COMMAND_SETUICCSERVICESTATE = 0x0000006D,
    RIL_COMMAND_GETCALLLIST = 0x0000006E,
    RIL_COMMAND_GETEXECUTORFOCUS = 0x0000006F,
    RIL_COMMAND_SETEXECUTORFOCUS = 0x00000070,
    RIL_COMMAND_GETEMERGENCYMODE = 0x00000071,
    RIL_COMMAND_GETEXECUTORRFSTATE = 0x00000072,
    RIL_COMMAND_SETEXECUTORRFSTATE = 0x00000073,
    RIL_COMMAND_RESETMODEM = 0x00000074,
    RIL_COMMAND_CANCELGETOPERATORLIST = 0x00000075,
    RIL_COMMAND_AVOIDCDMASYSTEM = 0x00000076,
    RIL_COMMAND_SETPSMEDIACONFIGURATION = 0x00000077,
    RIL_COMMAND_GETPSMEDIACONFIGURATION = 0x00000078,
    RIL_COMMAND_ENABLEMODEMFILTERS = 0x00000400,
    RIL_COMMAND_DISABLEMODEMFILTERS = 0x00000401,
    RIL_COMMAND_STARTMODEMLOGS = 0x00000402,
    RIL_COMMAND_STOPMODEMLOGS = 0x00000403,
    RIL_COMMAND_DRAINMODEMLOGS = 0x00000404,
    RIL_COMMAND_COUNT = 0x00000404
} RILCOMMANDS;

typedef struct RILVERSIONPARAMS {
    WORD Minor;
    WORD Major;
} RILVERSIONPARAMS, *LPRILVERSIONPARAMS;

typedef struct GETDEVICEINFORESPONSE {
    char Result[256];
} GETDEVICEINFORESPONSE, *LPGETDEVICEINFORESPONSE;


// Turns off packing of structures, which enables the automatic alignment.
#include <poppack.h>

